You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Node (and React-native) the WebSocket constructor can take additional parameter which can set the HTTP request options for the initial request. This can be used to set headers etc.
In Node (and React-native) the WebSocket constructor can take additional parameter which can set the HTTP request options for the initial request. This can be used to set headers etc.
https://github.com/theturtle32/WebSocket-Node/blob/master/docs/W3CWebSocket.md#constructor
https://github.com/facebook/react-native/blob/29fb2a8e90fa3811f9485d4b89d9dbcfffea93a6/Libraries/WebSocket/WebSocket.js#L97
Inconveniently
W3CWebSocket
and React-Native class take different parameters.Maybe it would be best to add option to provide a function to create the WebSocket object?
Currently I'm using workaround to replace global WebSocket object:
The text was updated successfully, but these errors were encountered: