So I\'m using react native websockets but cannot figure out how i can include cookies in websockets, any suggestions?
As of React Native 0.38, this should happen automatically on Android.
There's currently an open PR for making it work automatically on iOS as well, but at the moment it seems there's still some work left there around testing.
In the meanwhile, you could follow the "manual approach" proposed here:
Manual approach is to retrieve the cookie through a cookie manager plugin and pass it as headers to web socket.
(Once you have the cookie from the manager, the way to pass it to the websocket is, as mentioned previously, to use the undocumented 3rd parameter of WebSocket
.)