Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

support for http redirects #23

Open
tedivm opened this issue Mar 22, 2017 · 2 comments
Open

support for http redirects #23

tedivm opened this issue Mar 22, 2017 · 2 comments

Comments

@tedivm
Copy link

tedivm commented Mar 22, 2017

I'm attempting to connect to a websocket, and the way the particular service works is that they'll issue a 301 redirect to a new URL and then establish the socket connection. This url is different every time (although it does follow a pattern).

Unfortunately this is causing an error to occur, as it appears this behavior isn't currently supported in this project. I also can't seem to find a way to extract the new location from the 'evt' object to attempt a new connection manually.

Any help would be appreciated.

@NathanaelA
Copy link
Owner

Well, I would use that https://github.com/yaqwsx/nativescript-simple-networking to make the initial connection then take the result and pass it to ws...

@tedivm
Copy link
Author

tedivm commented Apr 5, 2017

Yeah, that works, but only if you actually know and expect a redirect is going to occur. In cases where the endpoint for a websocket is moved and a redirect put in place this feature would ensure that clients still worked.

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

No branches or pull requests

2 participants