'IMAP Simple Get Part Data (attachment) response corrupt?

I am using imap-simple in my NodeJS project and I am trying to fetch an attachment (PDF) using Get Part Data, I am getting the following response in PostMan which I believe is a raw binary string?

%PDF-1.7 % 1 0 obj <> endobj 4 0 obj <> stream x��}M��8�޽E^|,�H� ,�g����x>.�53�kT������7OEee�...

I am trying to save this response as a file in PostMan (test.pdf) but when I try and open the file it is corrupt, is there anything that I am missing. Do I need to convert the response first or something?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source