thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Better SSE support

Open infalmo opened this issue 2 years ago • 8 comments

Currently, SSE responses are printed as is, without any formatting or highlighting

data:{...}

I'd like if a sse toggle is provided, splitting the response data by event name.

infalmo avatar Aug 09 '22 09:08 infalmo

Hi @infalmo thanks for the feedback.

What is SSE? can you also please provide more details

rangav avatar Aug 09 '22 09:08 rangav

https://en.wikipedia.org/wiki/Server-sent_events https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

Basically, a unidirectional version of websockets, that works over plain HTTP requests.

infalmo avatar Aug 09 '22 11:08 infalmo

Thanks got it.

Can you share a sample full response for me to test. and what is the response content-type for this?

Is there any sample url to test?

rangav avatar Aug 09 '22 11:08 rangav

https://hoppscotch.io/realtime/sse

^^This captures SSE perfectly.

infalmo avatar Aug 10 '22 16:08 infalmo

Currently, SSE responses are printed as is, without any formatting or highlighting

data:{...}

Thanks for sharing url, we dont have SSE feature yet in Thunder Client, how did you test it?

rangav avatar Aug 10 '22 17:08 rangav

SSE's are glorified GET requests. Just make a get request to the endpoint on thunder.

infalmo avatar Aug 10 '22 17:08 infalmo

Alternatively (since thunder prints the body only after the request is completed), curl -N https://express-eventsource.herokuapp.com/events to try it out.

infalmo avatar Aug 11 '22 06:08 infalmo

Going to bump this, but I don't care about formatting as much. I would like to see an unbuffered response switch/toggle (what curl -N does) in order to be able to test event streams.

sjsadowski avatar Dec 08 '23 13:12 sjsadowski

This feature has been implemented and published to the marketplace. Please update to v2.19.0.

You can see all the features released in this update https://github.com/rangav/thunder-client-support/releases/tag/v2.19.0

Please test it and let me know your feedback

rangav avatar Mar 04 '24 14:03 rangav