r3labs / sse

Server Sent Events server and client for Golang
Mozilla Public License 2.0
870 stars 180 forks source link

Feature Request: Support non-GET method and request body in the sse client #153

Open munisystem opened 1 year ago

munisystem commented 1 year ago

Hi, thanks share great library.

I have to use the server-sent event client that to requests non-GET method and request body. But It seems to me that this library does not support. For this I patched this and be using it.

From what I understand, there are the server-sent events used on HTTP endpoints with methods other than GET. For example, in OpenAI's public API, they require the use of the POST method and request body.

What are your thoughts on supporting this feature? If no problems, I'll be glad to help.

so2liu commented 1 year ago

Hi, thanks share great library.

I have to use the server-sent event client that to requests non-GET method and request body. But It seems to me that this library does not support. For this I patched this and be using it.

From what I understand, there are the server-sent events used on HTTP endpoints with methods other than GET. For example, in OpenAI's public API, they require the use of the POST method and request body.

What are your thoughts on supporting this feature? If no problems, I'll be glad to help.

maybe this?

https://grciuta.medium.com/server-sent-events-with-go-server-and-client-sides-6812dca45c7