wx.connectSocket wss协议下 无法接连
wx.connectSocket wss协议下 真机无法接连提示’draft refuses handshakeNot Found’ ,请问大神如何解决?
问题解决方法
通过包分析真机缺少’Sec-WebSocket-Protocol’
wx.connectSocket({
url: this._host,
header: {
‘Sec-WebSocket-Protocol’: this._protocols //need add this
},
protocols: this._protocols,
});