WebSocket——[Error during WebSocket handshake: Unexpected response code: 200]解决方案
生活随笔
收集整理的這篇文章主要介紹了
WebSocket——[Error during WebSocket handshake: Unexpected response code: 200]解决方案
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
問題描述
WebSocket connection to 'ws://localhost:8888/MetroCity/ws/endpointChat' failed: Error during WebSocket handshake: Unexpected response code: 200?
問題分析
將withSockJS()去除,就可以通過原生方式連接了,因?yàn)閟oket在瀏覽器不支持WebSocket請求是會自動切換為http請求輪訓(xùn)方式
解決方案
參考文章
https://blog.csdn.net/slt6366078/article/details/80360941
https://www.cnblogs.com/caer/p/6105854.html
https://www.cnblogs.com/jinjian91/p/10537099.html
總結(jié)
以上是生活随笔為你收集整理的WebSocket——[Error during WebSocket handshake: Unexpected response code: 200]解决方案的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Vuex——命名空间导致错误[unkno
- 下一篇: WebSocket——[Error du