chaitanyad chaitanyad - 2 months ago 25
Android Question

method to send httpheaders from android autobahn websocketconnection

I want to send user agent as an extra header.
This is available in Eric Butlers library https://github.com/codebutler/android-websockets.
Wanted to go with autobahn though.
Any ideas?

Answer

You can set additional HTTP headers to be sent during the initial opening WebSocket handshake using the headers parameter to conenct - pls see here.

This probably is missing from the interface definition (a bug), but should work nevertheless.

Comments