react-native-sse
react-native-sse copied to clipboard
Create a similar library for reactjs
I took the source code of the eventSource.js and used it in a reactjs app and worked like a charm, so this library is not limited to react-native. Great job.
Yes, this library is based purely on XMLHttpRequest, so it will work pretty much anywhere. However, EventSource should work out of the box in reactjs, so you shouldn't even need this library there.
The eventSource in reactjs doesn't support POST.
@meirm Why do you require POST request? Alternatively You can use https://www.npmjs.com/package/event-source-polyfill
You need POST request when you are using services such as OpenAI API in which you post the chat history (which is long) and get the results back as a stream.