# Help with setting header values (http request node)

**URL:** <https://discourse.nodered.org/t/help-with-setting-header-values-http-request-node/92754>\
**Category:** General\
**Created:** [28 October 2024 21:41 UTC](https://discourse.nodered.org/t/help-with-setting-header-values-http-request-node/92754 "2024-10-28T21:41:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sirhc](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sirhc](https://discourse.nodered.org/u/Sirhc)\
**Post date:** [28 October 2024 21:41 UTC](https://discourse.nodered.org/t/help-with-setting-header-values-http-request-node/92754/1 "2024-10-28T21:41:08Z")

</div>

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](https://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? :\

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 January 2025 21:41 UTC](https://discourse.nodered.org/t/help-with-setting-header-values-http-request-node/92754/2 "2025-01-26T21:41:17Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
