Problem with format in HTTP Request node

Hi, I have a function node which creates a token for use in a http request node.

let token = flow.get('token');

msg.cookies = {
    'IDALToken='   : token
    }
return msg;

Worked flawlessly, up to the update from Node Red 4.0 to 4.0.5. Now I get an error warning:
"TypeError: argument name is invalid"

I suppose this has something to do with Ensure will payload is a string #4873. How should I modify the function node to avoid this error? Thank you!
Graefe

Hi @Graefe

Sorry - what's the connection between the above (HTTP Looking) snippet and MQTT?
also, unless its required by the service you're interacting with, the cookie name does not need an = after it

msg.cookies = {
    'IDALToken'  : token
}
return msg;

Are you sure this error is coming from the above?
maybe share a flow that reproduces the error?

Yes, this was the solution! No idea, why Node Red prior to 4.0.3 had no problems with this expression.
The connection is, that there is a http-request node which uses the token as a cookie. And which sent the error - until now. I hope this describes the setup well enough. Work with cookies : Node-RED.
Thank you!

Awesome!

I have updated the title to represent the Node you had problems with.

1 Like