# Application/x-ndjson

**URL:** https://discourse.nodered.org/t/application-x-ndjson/100794
**Category:** General
**Tags:** http-request, streaming
**Created:** [18 April 2026 17:47 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794 "2026-04-18T17:47:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![svefro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/svefro/32/4306_2.png) [@svefro](https://discourse.nodered.org/u/svefro)
#### Post date: [18 April 2026 17:47 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794/1 "2026-04-18T17:47:09Z")

</div>

im integrating against ollama and need to read "node red application/x-ndjson" stream from ollama.

tested this with the core http-request node but it refuses to stream the response. i just get a timeout. or everything at once.

tested various other contrib nodes but could just find ones that only support GET request. i need to POST.

Anyone have a good solution to this?  
i could always create a external app for this but prefair to have it in node-red.

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [18 April 2026 17:48 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794/2 "2026-04-18T17:48:30Z")

</div>

~~http-in and http-out nodes do not support http streaming.~~

~~The http-out node will close the connection after it has sent the first message it receives from the http-in node.~~

Sorry, misread.

But the same answer applies, the http-request node does not support HTTP streaming.

You can adjust the timeout in the `settings.js` with the `httpRequestTimeout` field or `msg.requestTimeout`

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [18 April 2026 18:03 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794/3 "2026-04-18T18:03:44Z")

</div>

Hi @svefro

Try sending a RAW request via the `TCP Request` Node

- Send a valid (Correctly formatted) `HTTP` request using the `TCP Request` Node  
(keeping the connection open - `Never - Keep connection open`)

RAW HTTP Request example (Send to a `TCP Request` Node)

```auto
/* Adjust accordingly */
const HTTPRequest = [
    'POST /SOME/URI HTTP/1.1',
    'Host: XXXXX:XXXXX',
    'Content-Type: application/json'
    'Accept: application/x-ndjson\r\n'
    '{SomeJSON}'
]

msg.payload = HTTPRequest.join('\r\n')
return msg

```

This, I believe should give you streaming (untested)

I dont know the protocol, so adjust the request according to its requirements (`POST` v `GET`, with a body etc etc) - might need to check my code - it was a quick write

---

<div class="post-metadata">

### Author: ![svefro](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/svefro/32/4306_2.png) [@svefro](https://discourse.nodered.org/u/svefro)
#### Post date: [18 April 2026 21:34 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794/4 "2026-04-18T21:34:21Z")

</div>

Thanks for pointing me to a tcp node. 🙂

i used this (got badrequest without content length):

```auto
const body = JSON.stringify({ model: "deepseek-r1:8b" });

const HTTPRequest = [
    'POST /api/pull HTTP/1.1',
    'Host: 192.168.1.100',
    'Content-Type: application/json',
    'Accept: application/x-ndjson',
    'Content-Length: ' + Buffer.byteLength(body),
    '', // required blank line
    body
];

msg.payload = HTTPRequest.join('\r\n');

return msg;

```

and it worked 🙂

but in the meantime i tested using curl in an exec node and got some strange errors:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/0/00337d78305a36bc33e4944c91483ae64f3bd151.png)

when using exec mode it works as expected, but in spawn mode i get a bunch of errors:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/212888795935beddc41d039541da6991d6871c7c.png)

any idea what is causing this??

Anyway i'll stick with the raw http request way. Thanks again 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [17 July 2026 21:34 UTC](https://discourse.nodered.org/t/application-x-ndjson/100794/5 "2026-07-17T21:34:39Z")

</div>

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