I tried use Axios and problem with get a PDF file. With XML file is correct. Where is my error sorry my question I need to use Axios because node http not resolve return of erp api for download files. I believe it is something in the conversion of pdf to base64 I have tried in many ways without success.
I try get but not receive file. I try get in Postman with success. My response header Content-Type application/octet-stream, Content-Disposition attachment; filename=“32201011638543000236550020000330271430887396-nfe.pdf”. I try use default node http but return file this image:
Thank you for your help and follow up. Works perfectly with your example but my problem is when trying to connect and download PDF file to another server below the images:
Btw. if you need help with this problem please open a new issue. We have to make sure to keep discussions on topic, else it gets very messy and people which have a similar issue will so not find your question and so also not the solution.