Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do i get the http status code in long polling requests? #619

Open
eeeman1 opened this issue Feb 16, 2023 · 2 comments
Open

how do i get the http status code in long polling requests? #619

eeeman1 opened this issue Feb 16, 2023 · 2 comments

Comments

@eeeman1
Copy link

eeeman1 commented Feb 16, 2023

all that comes to me from the server is -

{
 ⁣ ⁣ ⁣ ⁣"type": "close",
 ⁣ ⁣ ⁣ ⁣"bubbles": false,
 ⁣ ⁣ ⁣ ⁣"cancelable": false,
 ⁣ ⁣ ⁣ ⁣"timeStamp": 1676546179923,
 ⁣ ⁣ ⁣ ⁣"wasClean": false,
 ⁣ ⁣ ⁣ ⁣"code": 1002,
 ⁣ ⁣ ⁣ ⁣"reason": "Cannot connect to server"
}
@auvipy
Copy link

auvipy commented Feb 17, 2023

i think stack overflow is the right place for this type of questions

@FZambia
Copy link
Contributor

FZambia commented Apr 24, 2023

SockJS was designed as the polyfill for the WebSocket API. There is no way to get status code returned by a server during Upgrade in WebSocket case. Take a look at this SO answer for some additional details. SockJS hides some specifics of other transports used for WebSocket fallback mimicking WebSocket API. This may be inconvenient in some cases of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants