Raw JSON headers in HTTP Requests

Hi Guys,

There is no longer the option to add raw json for the header parameters in the HTTP request (from what I can see). How is this resolved? Currently duplicating old nodes, for now, to get around this problem.

Information on your n8n setup

  • n8n version: 0.197.1
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hey @pb84,

That is a good spot, At the moment it looks like you would need to add the headers using key / value options.

Is there something in your workflow that needs the raw option over this?

Yep - so if you are doing a custom HTTP request to Xero it doesn’t like it if the key value options are non-raw (e.g. “Content-Type”:“application/json” works well in raw; Xero does not respect it if you put it via key value options)

I suspect Xero doesn’t really know if you are using Raw or not as we should be making the same change internally in the post request.

Testing with Content-Type it seems to be setting ok, Are you getting an error back from Xero? It won’t help with adding the raw option back but maybe we can work out what the issue is.

No worries,

please see below for the workflow:

Notice the difference in outputs:

The old node gives the json required (right). The new one outputs it as xmlns I think, even though content-type is requested as json.

I have the same query/concern.

I’ve found myself often using the Raw option to set Query/Headers/Body in the HTTP node, dynamically by referencing the output of a function node. It would be a major downgrade to not be able to do that anymore.

Agreed that this is an issue that I like with the old HTTP request node - being able to reference the output from a function node

The header you are using shouldn’t have any impact on the data coming back, As far as I am aware content-type sets the type of data that is being sent so in this case you are telling Xero you are sending JSON data and it looks like you get XML in return.

I noticed in the old node you have the response type set to JSON but not in the new node, Have you tried setting that same option to see if it changes the response?


You could also try adding an Accept header which will tell Xero to return the data in JSON rather than XML.

Will try this