endel / NativeWebSocket

🔌 WebSocket client for Unity - with no external dependencies (WebGL, Native, Android, iOS, UWP)
Other
1.27k stars 161 forks source link

constructor parameter "headers" not working on WebGL #14

Open veboys opened 4 years ago

veboys commented 4 years ago

On webgl, client has passed some custom headers, but server has'nt received them.

endel commented 4 years ago

Hi @veboys, the browser does not allow sending custom HTTP headers through WebSocket requests. I think what you could do is sending the data you need through query string instead of a browser environment. https://stackoverflow.com/a/4361358/892698