You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been exploring the htmx sse extension and appreciate the ease of use and functionality that it provides.
I am unsure how to cancel an event stream. Per https://web.dev/articles/eventsource-basics, it says "To cancel a stream from the server, respond with a non text/event-stream Content-Type or return an HTTP status other than 200 OK (e.g. 404 Not Found)."
When I do this, the stream stops, but then the event stream is re-initiated, potentially due to the Automatic Reconnection logic?
How can I avoid automatic reconnection in this case?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have been exploring the htmx sse extension and appreciate the ease of use and functionality that it provides.
I am unsure how to cancel an event stream. Per https://web.dev/articles/eventsource-basics, it says "To cancel a stream from the server, respond with a non text/event-stream Content-Type or return an HTTP status other than 200 OK (e.g. 404 Not Found)."
When I do this, the stream stops, but then the event stream is re-initiated, potentially due to the Automatic Reconnection logic?
How can I avoid automatic reconnection in this case?
Beta Was this translation helpful? Give feedback.
All reactions