# Inputs.http json data in body

**URL:** <https://community.influxdata.com/t/inputs-http-json-data-in-body/16572>\
**Category:** Telegraf\
**Tags:** telegraf\
**Created:** [November 2, 2020, 7:26pm UTC](https://community.influxdata.com/t/inputs-http-json-data-in-body/16572 "2020-11-02T19:26:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suhaf\_Butt](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/suhaf_butt/32/5867_2.png) [@Suhaf\_Butt](https://community.influxdata.com/u/Suhaf_Butt)\
**Post date:** [November 2, 2020, 7:26pm UTC](https://community.influxdata.com/t/inputs-http-json-data-in-body/16572/1 "2020-11-02T19:26:50Z")

</div>

I am using inputs.http plugin and I need to set the body attribute of the plugin with JSON data but it is not allowing me to. Is there another way around it?

body = { ‘ids’: [1,2,3,4] }

---

<div class="post-metadata">

**Author:** ![Suhaf\_Butt](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/suhaf_butt/32/5867_2.png) [@Suhaf\_Butt](https://community.influxdata.com/u/Suhaf_Butt)\
**Post date:** [November 2, 2020, 8:44pm UTC](https://community.influxdata.com/t/inputs-http-json-data-in-body/16572/2 "2020-11-02T20:44:26Z")

</div>

I fixed the issue with the help of @mhall119 .  
I was not setting the **header = {‘content-type: application/json’}** in the conf file. Once I did that, it was working.
