Hi all
im fairly new to Node Red and up until now things have been going swimmingly.
I am trying to get an HTTP request (post) to work and non matter what i try i always get a 400 bad response.
The request is being used to control a device (not a pc) that runs an HTTPS server with a self signed cert.
I've built a request in postman that works like a charm but doing the same using an HTTP request node in NR just gets me a 400 response.
the json body of the request is
{
"jsonrpc": "2.0",
"method": "powerControl",
"params": {
"power": "powerOn",
"AccessToken": "my secret access token"
},
"id": 1
}
and it requires content-type and accept headers to be application/json. Simples it would seem.
Ive looked at the actual http requests using a postman mock server and the only difference is the content-length. Postman sets it to 201 and NR sets it to 143 for the exact same request.
Ive spent days trying different ways to achieve this using inject nodes to set the headers and payload, function nodes to do the same and it always returns the same.
I think im going slowly mad but any advice would be very much appreciated.
Oh and i have set my instance of NR to ignore SSL errors (because of the self signed cert on the server device)