EventSource MIME type
Closed this issue · 2 comments
HI,
I'd love to use this in a current project but when I work through Getting Started" with a simple bit of code in a page to gather the SSE events, I get the following error:
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
How do I go about resolving this?
Hi,
The error doesn't exactly say what issue you are experiencing, beside the fact that your are trying to establish a connection but the endpoint returns an HTML. There are multiple possible reasons:
- You are trying to establish connection against wrong endpoint
- Authentication is interfering with the flow
- There was a server side error
And some more. To be able to narrow that done, you need to grab the raw response (browser dev tools will be able to do it).
Hi @richbryant,
I'm closing this one. If you will have any follow up details etc., please feel free to reopen.