当前位置:   article > 正文

WebSocket——[Error during WebSocket handshake: Unexpected response code: 200]解决方案_failed: error during websocket handshake: unexpect

failed: error during websocket handshake: unexpected response code: 200

问题描述

WebSocket connection to 'ws://localhost:8888/MetroCity/ws/endpointChat' failed: Error during WebSocket handshake: Unexpected response code: 200 

问题分析

将withSockJS()去除,就可以通过原生方式连接了,因为soket在浏览器不支持WebSocket请求是会自动切换为http请求轮训方式

解决方案

参考文章

https://blog.csdn.net/slt6366078/article/details/80360941

https://www.cnblogs.com/caer/p/6105854.html

https://www.cnblogs.com/jinjian91/p/10537099.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/179236
推荐阅读
相关标签
  

闽ICP备14008679号