# Capture response from HTTP requests using HTTP Output Plugin in Logstash

**URL:** https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609
**Category:** Logstash
**Created:** [February 1, 2016, 7:21am UTC](https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609 "2016-02-01T07:21:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Vaibhav\_Chawla](https://avatars.discourse-cdn.com/v4/letter/v/47e85d/32.png) [@Vaibhav\_Chawla](https://discuss.elastic.co/u/Vaibhav_Chawla)
#### Post date: [February 1, 2016, 7:21am UTC](https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609/1 "2016-02-01T07:21:03Z")

</div>

Hello, I could not figure out a way to capture the response by issuing a HTTP request to a target endpoint using the HTTP Output plugin. I just want to get the status code displayed (200 OK / 404 Not Found) on the console or wherever it can. Please help. 🙂

---

<div class="post-metadata">

### Author: ![ben.joyce](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben.joyce/32/7393_2.png) [@ben.joyce](https://discuss.elastic.co/u/ben.joyce)
#### Post date: [February 1, 2016, 7:53am UTC](https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609/2 "2016-02-01T07:53:09Z")

</div>

Could you share your config? It would help.

Ben

---

<div class="post-metadata">

### Author: ![wgeng](https://avatars.discourse-cdn.com/v4/letter/w/cdc98d/32.png) [@wgeng](https://discuss.elastic.co/u/wgeng)
#### Post date: [October 10, 2016, 8:38pm UTC](https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609/3 "2016-10-10T20:38:45Z")

</div>

is it possible to output to HTTP if the status code is 200; if it's non-200 output to another channel, e.g. a file or redis queue?

our config looks like this:

```auto
output {
  stdout { codec => rubydebug }
  http {
    url => "http://x.x.x.x:8080/some/api"
    http_method => "put"
    content_type =>"application/json"

    headers => ["Application", "application/json"]
    #codec => "json"
    format => "json"
  }
}

```

---

<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: [July 6, 2017, 4:34am UTC](https://discuss.elastic.co/t/capture-response-from-http-requests-using-http-output-plugin-in-logstash/40609/4 "2017-07-06T04:34:50Z")

</div>


