# How can I send the body of an http request in logstash

**URL:** https://discuss.elastic.co/t/how-can-i-send-the-body-of-an-http-request-in-logstash/208096
**Category:** Logstash
**Created:** [November 15, 2019, 3:27pm UTC](https://discuss.elastic.co/t/how-can-i-send-the-body-of-an-http-request-in-logstash/208096 "2019-11-15T15:27:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vbryandc](https://avatars.discourse-cdn.com/v4/letter/v/d9b06d/32.png) [@vbryandc](https://discuss.elastic.co/u/vbryandc)
#### Post date: [November 15, 2019, 3:27pm UTC](https://discuss.elastic.co/t/how-can-i-send-the-body-of-an-http-request-in-logstash/208096/1 "2019-11-15T15:27:44Z")

</div>

I need to retrieve the response of a POST REST API, for which I have to send the body of this service in json format, for example:

{  
"customerID": "123456",  
"context": "001"  
}

I have seen that the documentation uses the http and http\_poller plugin for APIS invocation. For example:

input {  
http\_poller {  
urls =\> {  
search =\> {  
method =\> get  
url =\> "[https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access\_token=ACCESS-TOKEN](https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN)"  
}  
}  
request\_timeout =\> 60  
interval =\> 60  
codec =\> "json"  
}  
}  
output {  
stdout {  
codec =\> rubydebug  
}  
}

But my question is some way to send the body of the API to get a response from the service (http 200)?

Thanks for your comments.

---

<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: [December 13, 2019, 3:27pm UTC](https://discuss.elastic.co/t/how-can-i-send-the-body-of-an-http-request-in-logstash/208096/2 "2019-12-13T15:27:58Z")

</div>

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