-
Hello, Is there a way I can use undici for SSE (server side events)? If so, could I utilize one connection to send requests to an API, and receive events over SSE? I am currently using https://github.com/EventSource/eventsource for this, but I would like to use undici. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
SSE is not supported atm, but it would be a great addition. |
Beta Was this translation helpful? Give feedback.
-
I can confirm! It does feel like What I noticed though is that because my microservice sits behind nginx proxy (even in localhost), I had to mess with switches to get it to not chunk the stream: location /wx/api/streaming/generate_stream {
proxy_pass https://127.0.0.1:8462/;
proxy_http_version 1.1;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
} I am guessing all those |
Beta Was this translation helpful? Give feedback.
SSE is not supported atm, but it would be a great addition.
Would you like to send a Pull Request to address this issue? Remember to add unit tests.