# How to send headers using http input plugin in logstash

**URL:** https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332
**Category:** Logstash
**Created:** [June 2, 2020, 12:15pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332 "2020-06-02T12:15:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Pankaj\_Jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_jadhav/32/65896_2.png) [@Pankaj\_Jadhav](https://discuss.elastic.co/u/Pankaj_Jadhav)
#### Post date: [June 2, 2020, 12:15pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332/1 "2020-06-02T12:15:43Z")

</div>

Hi  
am new in ES and logstash  
I want to do POST call  
Url:- [https://dm-dev-authenticationservice-serviceapps-use-rg.azurewebsites.net/api/v1/Token](https://dm-dev-authenticationservice-serviceapps-use-rg.azurewebsites.net/api/v1/Token)

Headers:-  
Content-Type :- application/json

Body :- {  
"ClientId": "sdmtSG9BOap6aLn5oxoaCrfLHQCIUMLF",  
"ClientSecret": "SqN4ywxCu6ylvn7ecoViEWB2NlUk9hup0eBn5VquT0XutSXCh6VKXC82dREeGIi2",  
"Audience": "[https://InventoryService/](https://InventoryService/)"  
}

can some one help me to create input plugin for this.

any example will also work

Thanks in advance

---

<div class="post-metadata">

### Author: ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)
#### Post date: [June 2, 2020, 1:07pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332/2 "2020-06-02T13:07:54Z")

</div>

Hi,  
You can just use the [logstash http plugin](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http.html), which create an object "headers" by default.

---

<div class="post-metadata">

### Author: ![Pankaj\_Jadhav](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_jadhav/32/65896_2.png) [@Pankaj\_Jadhav](https://discuss.elastic.co/u/Pankaj_Jadhav)
#### Post date: [June 2, 2020, 1:09pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332/3 "2020-06-02T13:09:14Z")

</div>

can you please help me an example

---

<div class="post-metadata">

### Author: ![abrx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abrx/32/43881_2.png) [@abrx](https://discuss.elastic.co/u/abrx)
#### Post date: [June 2, 2020, 1:16pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332/4 "2020-06-02T13:16:59Z")

</div>

```
input {
  http {
    port => 5045
  }
}

```

And then send your requests to port 5045.

There is also a possibility to [index directly in Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-index.html) if you don't want filter with logstash.

Anyway you should give a look to [the docs](https://www.elastic.co/guide/en/logstash/current/configuration.html) 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 30, 2020, 1:17pm UTC](https://discuss.elastic.co/t/how-to-send-headers-using-http-input-plugin-in-logstash/235332/5 "2020-06-30T13:17:19Z")

</div>

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