wx.connectSocket wss协议下 无法接连
发布于 5 年前 作者 xiulan89 9868 次浏览 来自 问答

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,

      });

回到顶部