# JSON Stream from HTTP API as Input

**URL:** <https://discuss.elastic.co/t/json-stream-from-http-api-as-input/182601>\
**Category:** Logstash\
**Created:** [May 24, 2019, 9:29am UTC](https://discuss.elastic.co/t/json-stream-from-http-api-as-input/182601 "2019-05-24T09:29:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shorty](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@shorty](https://discuss.elastic.co/u/shorty)\
**Post date:** [May 24, 2019, 9:29am UTC](https://discuss.elastic.co/t/json-stream-from-http-api-as-input/182601/1 "2019-05-24T09:29:01Z")

</div>

Hello all,

I'm looking for a way to read an "endless" stream of JSON from an HTTP API. The JSON lines are newline delimited. Using the http\_plugin I always get after a lot of time the error "Could not read from stream: Premature end of chunk coded message body: closing chunk expected".

Any ideas? Should I use a different way? Any help would be much appreciated.

Thanks in advance,

Shorty

---

<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:** [June 21, 2019, 9:29am UTC](https://discuss.elastic.co/t/json-stream-from-http-api-as-input/182601/2 "2019-06-21T09:29:16Z")

</div>

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