收藏
回答

WebSocket connection 失败 Unexpected response code?

您好: 请问这是什么问题呢,,

VM1658 asdebug.js:1 WebSocket connection to 'wss://d1.mq.tddata.net:8084/mqtt' failed: Error during WebSocket handshake: Unexpected response code: 400

socket = wx.connectSocket({

      url: 'wss://d1.mq.tddata.net:8084/mqtt',

      header:{

        'content-type': 'application/json'

      },

      protocols: ['protocol1'],

      fail:res=>{

        console.log("fail",res)

      },

      success:(res)=>{

        console.log("success",res

      }

    })



回答关注问题邀请回答
收藏
登录 后发表内容