Yaffle / EventSource

a polyfill for http://www.w3.org/TR/eventsource/
MIT License
2.11k stars 338 forks source link

target url differs from the request i am making #198

Open regola-Tacens opened 2 years ago

regola-Tacens commented 2 years ago

Hi, There is probably something very obvious that i am not understanding right, and the real issue is probably me not getting the polyfill right, rather than the poylfill doing something wrong...but, i am struggling with something here so if you could give me ahint it'd be much appreciated :)

when making my connection to my route: 'https://my-api.my-domain.com' i am getting a connectionEvent of type 'error', ,telling me it can't find the route : url: "https://my-domain.com\n ",

wich in my network tab translates to a requestURL like this : "https://my-domain.com%20%20%20%20%20%20%20%20%20%20?LastEventId=215464464",

Off course my back end sends out a 404 to the front end because there is no such route

So...it keeps on failing,

Yaffle commented 2 years ago

looks like you have a lot of spaces

regola-Tacens commented 2 years ago

it's the case, i'm just not sure why it is so....i will investigate