# Logstash Http Poller Method Head

**URL:** https://discuss.elastic.co/t/logstash-http-poller-method-head/280855
**Category:** Logstash
**Created:** [August 9, 2021, 11:35pm UTC](https://discuss.elastic.co/t/logstash-http-poller-method-head/280855 "2021-08-09T23:35:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gutierrezfj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gutierrezfj/32/92727_2.png) [@gutierrezfj](https://discuss.elastic.co/u/gutierrezfj)
#### Post date: [August 9, 2021, 11:35pm UTC](https://discuss.elastic.co/t/logstash-http-poller-method-head/280855/1 "2021-08-09T23:35:52Z")

</div>

I'm trying to retrieve data from an CUSTOM API which only allows HEAD requests, consequently the result is an empty body.  
where could the header response data be?  
is it possible to capture the data from a response header?  
http poller support header method?

input {  
http\_poller {  
urls =\> {  
mytest =\> {  
method =\> head  
url =\> "[https://myurl](https://myurl)"  
headers =\> {  
"X-IBM-Client-Id" =\> "myid"  
"X-IBM-Client-Secret" =\> "mysecret"  
"Content-Type" =\> "mycontenttype"  
}  
}  
request\_timeout =\> 30  
schedule =\> { cron =\> "\* \* \* \* \* UTC"}  
metadata\_target =\> "http\_poller\_metadata"  
}  
}

filter {  
}

output {  
stdout { codec =\> rubydebug }  
}

Thanks

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [August 10, 2021, 1:18am UTC](https://discuss.elastic.co/t/logstash-http-poller-method-head/280855/2 "2021-08-10T01:18:59Z")

</div>

> [@gutierrezfj](#):
>
> is it possible to capture the data from a response header?

Yes. See the [metadata\_target](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-http_poller.html#plugins-inputs-http_poller-metadata_target) option. Note that it has a default value.

---

<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: [September 7, 2021, 1:19am UTC](https://discuss.elastic.co/t/logstash-http-poller-method-head/280855/3 "2021-09-07T01:19:48Z")

</div>

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