I am trying to set some headers for my http request node. I need to send a POST request with key of ABCDEF and a timestamp in the header.
I have tried the following in a function node, which is connected to the http request node.
let d = new Date(msg.payload); //msg.payload is an inject node with timestamp
var currenttime = new Date().getTime();
msg.method = 'POST';
msg.headers.key =ABCDEF
;
msg.headers.data = { timestamp: currenttime };
It all works fine, but I need to remove the " " (quotation marks) from the key header and I need to send the timestamp header in microseconds, for example 1732198724.034341
Can anyone help me with this? :\