For a Post request to an API I need to sent a RAW JSON body. Which is no problem of course. Except for the fact that the header also changes to RAW when doing this in the HTTP node.
With Postman I can POST just fine for this API. But with n8n I am struggeling.
The Header is:
key = data
value = { “POSUniqueID”: “futurepos”, “ClientID”: “@(&#&@#&^@#", “Hash”: "@(&#($)&(#$” }
I tested it with pipedream, which gives a clear difference.
So it looks like this will do the job but it isn’t pretty, You basically need to treat the data value as a string rather than as JSON as the json parser kicks in and makes it an object instead of doing the other option which would be to create multiple headers to match the JSON.
awesome, this works. Thanks alot.
Have a nice dinner.
I am pretty sure I tried something like this, think I didn’t use the correct escaping. I think I did something like: {"data":\"{\"POSUniqueID\": \"futurepos\", \"ClientID\": \"^%&&%&\", \"Hash\": \"&%&^%\"}\"}
which would mean 2 escapes too many
Need to fix this with the data from other nodes now, but I guess that wouldnt be a problem. Something to do tomorrow.
Thanks again.
If anyone else has a more elegant solution it is of course welcome.