I'm attempting to send an http post request to an API. I can send it successfully using https://apitester.com/ online API tester but when I try it with Node-Red I get a 302 error. The one variable i've found that gets me the same error with the online tester is not setting the Content-Type to application/json.
When I set this in node red the returned payload has Content-Type text/html; charset=UTF-8
This is in my function node:
msg.headers = {
'Authorization': 'Bearer',
"Content-Type" : "application/json"
};
msg.data = {
"checkout_to_type": "location",
"assigned_location": 1,
"location_id": msg.location
}
return msg;