# Hi, I need help about Stream Http Response

**URL:** <https://discourse.nodered.org/t/hi-i-need-help-about-stream-http-response/97187>\
**Category:** General\
**Tags:** http-request, function-node, dashboard-2, http\
**Created:** [21 May 2025 12:03 UTC](https://discourse.nodered.org/t/hi-i-need-help-about-stream-http-response/97187 "2025-05-21T12:03:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dysoft](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@dysoft](https://discourse.nodered.org/u/dysoft)\
**Post date:** [21 May 2025 12:03 UTC](https://discourse.nodered.org/t/hi-i-need-help-about-stream-http-response/97187/1 "2025-05-21T12:03:21Z")

</div>

Guys There is a web request that i am receiving from

**Node : http in**  
\*\*GET : method \*\*  
**/msg\_stream : PATH ,**

URL : [http://localhost:1880/msg\_stream](http://localhost:1880/msg_stream)

When i get request, i need to response with "text/event-stream"

```auto
msg.headers['Content-Type'] = 'text/event-stream';
msg.headers['Cache-Control'] = 'no-cache';
msg.headers['Connection'] = 'keep-alive';
msg.headers['Transfer-Encoding'] = 'chunked';

```

What is the mean of it ?  
I need to send responses chunk by chunk to the client. Talking about Step by Step sending responses.  
Because of that i need, msg.res.write() function or alternative, but i do not have the necessary function in msg.res-\> . so I cant access it.

I can write global functions in settings.js file, BUT I have to pass the Response to the global function, there is only 1 response in msg object, it is msg.res, I think it is coming from express.js . I do not know How can I get access the Response of "msg.res" and cast it to another response type. Because msg.res do not contains neccessary methods that i need.  
OR i do not know how to send partially responses.

I need to write 3 writes

```auto
res.write("message 1 ")
res.write("message 2 ")
res.write("END")

```

Please help me, how can i do that. !

msg.res : list of functions .

```auto

function : (warn)
object
_res: [internal]
append: function
attachment: function
cookie: function
clearCookie: function
download: function
end: function
format: function
get: function
json: function
jsonp: function
links: function
location: function
redirect: function
render: function
send: function
sendfile: function
sendFile: function
sendStatus: function
set: function
status: function
type: function
vary: function

```

**Another question is that:**  
How can i get the content of the written function node "http Response" and "http in" , where the source code located ?  
may be i can manipulete the code or i can write my own nodes.

---

<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:** [21 May 2025 15:02 UTC](https://discourse.nodered.org/t/hi-i-need-help-about-stream-http-response/97187/2 "2025-05-21T15:02:25Z")

</div>

Hi @dysoft

Welcome to the forums.

The HTTP Response Node, does not (currently) support streaming responses, not sure if it's being worked on.

Maybe take a look at this, it uses SSE (Server Sent Events)  
NOTE: Have never used this Node, but may seem it will add the features you need. 🤷

> **[@tq-bit/node-red-contrib-server-sent-events](https://flows.nodered.org/node/@tq-bit/node-red-contrib-server-sent-events)**
>
> Nodes to create - or subscribe to - server-sent events

---

<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:** [20 July 2025 15:03 UTC](https://discourse.nodered.org/t/hi-i-need-help-about-stream-http-response/97187/3 "2025-07-20T15:03:18Z")

</div>

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