Add extra headers to websocket connection from browser in Dart Add extra headers to websocket connection from browser in Dart dart dart

Add extra headers to websocket connection from browser in Dart


You will have to use cookies which are automatically sent by websocket as well but you can't customize the headers sent with a WebSocket request.

You can also send and receive a session token in the payload. See https://devcenter.heroku.com/articles/websocket-security#authentication-authorization for more detailed explanation.