# Custom header with a ISO-8601 format in the logstash http\_poller input

**URL:** https://discuss.elastic.co/t/custom-header-with-a-iso-8601-format-in-the-logstash-http-poller-input/163470
**Category:** Logstash
**Created:** [January 9, 2019, 8:09am UTC](https://discuss.elastic.co/t/custom-header-with-a-iso-8601-format-in-the-logstash-http-poller-input/163470 "2019-01-09T08:09:19Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ash74268](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@ash74268](https://discuss.elastic.co/u/ash74268)
#### Post date: [January 9, 2019, 8:09am UTC](https://discuss.elastic.co/t/custom-header-with-a-iso-8601-format-in-the-logstash-http-poller-input/163470/1 "2019-01-09T08:09:19Z")

</div>

Is there a way to generate a header with ISO-8601 time when using http\_poller input plugin?  
e.g:  
input {  
http\_poller {  
urls =\> {  
notification =\> {  
method =\> get  
url =\> "[http://host](http://host):port/api"  
headers =\> {  
"Content-Type" =\> "application/json"  
"X-AuthKey" =\> "xxxxxxxxxxxxx"  
"X-Date" =\> "????????????"  
}  
type =\> "notification\_event"  
}  
}  
socket\_timeout =\> 30  
request\_timeout =\> 30  
codec =\> "plain"  
schedule =\> { "every" =\> "1m" }  
}  
}

where I need to generate current date in ISO8601 format for "X-Date" header everytime the http\_poller sends a request.  
Any input would be very helpful.

Thanks

---

<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: [February 6, 2019, 8:09am UTC](https://discuss.elastic.co/t/custom-header-with-a-iso-8601-format-in-the-logstash-http-poller-input/163470/2 "2019-02-06T08:09:20Z")

</div>

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