Reputation: 155
So basically I want to get authentication with my websocket and the authentication required cookies, so how can I post request my cookies into websocket in js.
here is my code
var uri = 'ws://' + window.location.hostname + window.location.pathname.replace('default.htm', '') + 'chat.ashx?username=' + username;
websocket = new WebSocket(uri);
Upvotes: 14
Views: 55039