# Header is in post request

**URL:** <https://discourse.nodered.org/t/header-is-in-post-request/10661>\
**Category:** General\
**Created:** [30 April 2019 06:48 UTC](https://discourse.nodered.org/t/header-is-in-post-request/10661 "2019-04-30T06:48:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niclas.w82](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/niclas.w82/32/31813_2.png) [@niclas.w82](https://discourse.nodered.org/u/niclas.w82)\
**Post date:** [30 April 2019 06:48 UTC](https://discourse.nodered.org/t/header-is-in-post-request/10661/1 "2019-04-30T06:48:48Z")

</div>

Hi.

Trying to set the message header Content-Type but I can not get it to work.  
my code looks like this

msg.payload = {"action":"ARM\_REQUEST"},  
msg.headers = {"Content-Type":"application/vnd.assaabloy.arx.integrated-alarm-1.0+json"};  
msg.headers = {Accept:"application/vnd.assaabloy.arx.integrated-alarm-1.0+json"};

return msg;

Attach a screenshot from wireshark

![screen](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3a9b6af256ee2e14c2f7b8cfcd9954214c7677be.png)

Any idea how to set Content-Type Correct?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [30 April 2019 08:07 UTC](https://discourse.nodered.org/t/header-is-in-post-request/10661/2 "2019-04-30T08:07:19Z")

</div>

You are setting msg.headers to one value, then immediately overwritting it with another. Perhaps you meant the second one to add the Accept property rather than throwing away the Content Type property.  
`msg.headers.Accept = "application/vnd.assaabloy.arx.integrated-alarm-1.0+json"`
