mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.17k stars 22.46k forks source link

Missing info on EventSource #36416

Open kipraskrasilnikas opened 1 day ago

kipraskrasilnikas commented 1 day ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/EventSource

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

There is absolutely no specification on what the URL should look like and what it should be returning. Cause in the examples there is an incomplete url being used and it is absolutely unclear what it should do.

By logic, it should be returning SSE messages and the eventSource should be catching them, but that's not the case at all it seems.

What did you expect to see?

  1. How to properly see the error messages you are receiving, cause now onerror just returns an error event with absolutely no useful information
  2. What the called url should look like and what exact formatting and messages EventSource is expecting, what it returns. Overall how the object is used, initialized and how it handles things in detail

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details * Folder: `en-us/web/api/eventsource` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/EventSource * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/eventsource/index.md * Last commit: https://github.com/mdn/content/commit/f216422c99b6c7014e398803b70600501bce8a48 * Document last modified: 2024-10-16T05:12:45.000Z
Josh-Cena commented 1 day ago

Have you read https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events?

kipraskrasilnikas commented 12 hours ago

No, thanks

2024-10-20, sk, 20:07 Joshua Chen @.***> rašė:

Have you read https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events ?

— Reply to this email directly, view it on GitHub https://github.com/mdn/content/issues/36416#issuecomment-2425128145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHHDNLFX57RSIFWBNHX47DZ4PPNFAVCNFSM6AAAAABQILZQBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGEZDQMJUGU . You are receiving this because you authored the thread.Message ID: @.***>

kipraskrasilnikas commented 12 hours ago

Ok, it's still unclear what the url parameter should look like. Can it only be a file or any endpoint that returns a SSE stream?

2024-10-21, pr, 12:09 Kipras Krasilnikas @.***> rašė:

No, thanks

2024-10-20, sk, 20:07 Joshua Chen @.***> rašė:

Have you read https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events ?

— Reply to this email directly, view it on GitHub https://github.com/mdn/content/issues/36416#issuecomment-2425128145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHHDNLFX57RSIFWBNHX47DZ4PPNFAVCNFSM6AAAAABQILZQBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGEZDQMJUGU . You are receiving this because you authored the thread.Message ID: @.***>

kipraskrasilnikas commented 12 hours ago

Because I input a good url, but the eventSource keeps failing and it's absolutely unclear why

2024-10-21, pr, 12:13 Kipras Krasilnikas @.***> rašė:

Ok, it's still unclear what the url parameter should look like. Can it only be a file or any endpoint that returns a SSE stream?

2024-10-21, pr, 12:09 Kipras Krasilnikas @.***> rašė:

No, thanks

2024-10-20, sk, 20:07 Joshua Chen @.***> rašė:

Have you read https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events ?

— Reply to this email directly, view it on GitHub https://github.com/mdn/content/issues/36416#issuecomment-2425128145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHHDNLFX57RSIFWBNHX47DZ4PPNFAVCNFSM6AAAAABQILZQBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRVGEZDQMJUGU . You are receiving this because you authored the thread.Message ID: @.***>

Josh-Cena commented 8 hours ago

Well, it can be any URL that you can send requests to? This is where your server is hosted at. What's the error you are getting?