Hi
How can i decode the response?
I used NodeJs and here is my code for decoding the response
var encodedImage = new Buffer.from(result.body, 'binary').toString('base64');
res.end("<html><body>" +
"<img src=“data:image/png;base64,” + encodedImages + “” />" +
"</body></html>");
});
Join in the discussion - add comment below:
I faced a similar issue accept I’m trying to write to blob storage but the response from the POST doesn’t get me a valid binary, or atleast I don’t have a clear way inspecting how I can convert this to png. I used the GET method and it works fine.
I save the file with fs.writeFile(‘qrcode.png’,res.body,‘binary’,function(err){ … but it’s unreadable
Can i get for free ?
No comment
Hello, I do not know the exact way to handle it in NodeJS. But you get the binary data as response from the request. Did you try to save it as a file instead of showing it directly via base64?