Need help regarding encoding used by Postman when using option - "Save to a file"

Hi All,

I am new to Postman community ! I am working on a requirement wherein I have got a REST service which accepts the BASE64 encoded data in string format in body, and returns the output in byte array format, which is actually representation of a formatted PDF file.

The result, as seen in POSTMAN has many special characters, and when I copy the response AS-IS and save as PDF, it does not work and I loose much of the data in copy-paste. But when I use the option - “Save to a file” to save it to local system, it does work exactly fine, and I can open it as PDF.

Now I am trying to automate this process in JAVA, to call the REST service, send BASE64 encoded data as input, get the Byte Array as output from REST API, and save it directly to a file in a SFTP location. But it does not open this file as PDF.

When I open the file from SFTP as well as the one saved locally (from POSTMAN) in NOTEPAD++ and compare, I see difference in characters, they appear very different.

Kindly help understand what does POSTMAN tool do when it saves the response to a local file ? Does it change encoding etc.? So I can follow same and achieve my requirement.

Thanks & regards,
Rajesh S.

I ask myself exactly the same question :frowning: