# HTTP request failure on using the logstash-filter-http

**URL:** <https://discuss.elastic.co/t/http-request-failure-on-using-the-logstash-filter-http/264985>\
**Category:** Logstash\
**Created:** [February 21, 2021, 2:11pm UTC](https://discuss.elastic.co/t/http-request-failure-on-using-the-logstash-filter-http/264985 "2021-02-21T14:11:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pratz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pratz/32/84257_2.png) [@pratz](https://discuss.elastic.co/u/pratz)\
**Post date:** [February 21, 2021, 2:11pm UTC](https://discuss.elastic.co/t/http-request-failure-on-using-the-logstash-filter-http/264985/1 "2021-02-21T14:11:45Z")

</div>

I'm using http filter to fetch some json data from a server. Below is my conf file

```auto
input {
    file {
       path => "/opt/data/dum.txt"
       start_position => "beginning"
     }
}
filter {
   http {
       url => "http://jsonplaceholder.typicode.com/users"
       verb => GET
    }
}
output {
     stdout {
         codec => rubydebug
      }
}

```

I use a docker container for logstash. I'm able to curl the request successfully in the container. I'm getting the following error in logstash:

```auto
error during HTTP request {:url=>"http://jsonplaceholder.typicode.com/users", :body=>nil, :client_error=>"jsonplaceholder.typicode.com"}

```

Can you help me solve this?

---

<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:** [March 21, 2021, 2:11pm UTC](https://discuss.elastic.co/t/http-request-failure-on-using-the-logstash-filter-http/264985/2 "2021-03-21T14:11:53Z")

</div>

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