HTTP Node - Problem with Response format options

Hi N8N,

I am having a problem with the HTTP node.

I have an API that is supposed to send me a file attachment when the “accept” header is set to “text/csv” or “application/vnd.ms-excel”.

using postman, I am able to make the correct call no problem.

But I have been unable to make n8n do it, because the “reponse format” option in the http node ALWAYS adds it’s own additional “accept” parameters, even when I specific a custom accept header.

The problem is that the api sees something like this for “accept” as a result:

application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, */*;q=0.1

The end result is that the API doesn’t realize I want the file, and it just sends the typical JSON payload instead, which is not helpful.

For it to work, the accept header can only have this value:

text/csv

or

application/vnd.ms-excel

Any additonal data in the accept header and it won’t work.

We need an option on the HTTP node response type that is like “raw” or something, where it sends NOTHING else to the API, including content types, accept, etc…

The typical “raw” switch doesn’t disable these headers.

This is a blocking problem preventing me from migrating from integromat, as I have to be able to get these downloads from the API.

I’ve diagnosed this using webhook analysis tools (webhook.site in this case), vs postman, and this is the only explanation for this failure.

If I was up to speed I would try to fix this myself, but I’m not there yet.

Thanks,

I am sadly not able to reproduce the issue and works correctly for me:

I just added the most basic HTTP Request node (btw. tested with both POST and GET):

And that is what I got on webhook.site:

Is there anything else you set?

1 Like

Thanks Jan, I will try this myself. Perhaps my parameter combination was off…

Looks like your settings work. I have no idea what was wrong on my end, although in some testing I had response format set to JSON, which made the difference compared to trying to get a file (which is of course what I am trying to do)

Thanks for looking at this and getting me squared away!

Best,

1 Like

Glad to hear that you got it working!

Have fun!