android - 从android高速公路websocketconnection发送httpheaders的方法

标签 android websocket autobahn

我想将用户代理作为额外的 header 发送。 这在 Eric Butlers 图书馆中可用 https://github.com/codebutler/android-websockets . 虽然想和高速公路一起去。 有什么想法吗?

最佳答案

您可以设置在初始打开 WebSocket 握手期间发送的额外 HTTP header ,使用 headers 参数到 conenct - 请参阅 here .

这可能在 interface definition 中缺失(一个错误),但应该仍然有效。

关于android - 从android高速公路websocketconnection发送httpheaders的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23802721/

相关文章:

nginx - 如何修复此 Nginx 配置以正确代理 WebSocket 请求而不是返回 301?

python - 从高速公路 WebSocketClientProtocol 回调到另一个对象

python - 高速公路 WAMP 服务器的命令式客户端?

android - Firebase Firestore - 或查询

java - 使用 startMonitoringBeaconsInRegion 导致致命崩溃

java - "Cannot perform this action on a not sealed instance"java.lang.IllegalStateException异常

python beautifullsoup websocket

http - 如何捕获 WhatsApp 网络客户端通信?

python - Web 套接字服务器的后台任务

Android InputType密码和InputType数字不取数字