I have an API call that is supposed to download a pdf (or zip) file. It works in postman (clicking "Send and Download"), but it doesn't work using utils.downloadFile
in retool. It either comes back with a pdf that has the correct number of pages (but all are blank) OR if I try the zip method, it says the file cannot be unzipped.
I think the issue is that the API response in retool is in the format {response: {data : {message: "....."}}}, but if I try just extracting the message is when it comes back with a blank pdf.
I'm sure it's something with the encoding, but I cannot figure out how to get this to work.
According to the API docs, the content-type for the response is application/binary.
THis works perfectly in postman, so I know there isn't an issue with my request configuration.
Can anyone help with this?