开发者社区> 问答> 正文

sockjs 请求/info 应该返回什么?? 400 报错

sockjs 请求/info 应该返回什么?? 400 报错

http://docs.spring.io/spring/docs/4.0.6.RELEASE/spring-framework-reference/htmlsingle/#websocket


The SockJS client begins by sending "GET /info" to obtain basic information from the server. After that it must decide what transport to use. If possible WebSocket is used. If not, in most browsers there is at least one HTTP streaming option and if not then HTTP (long) polling is used.

我需要自己写一个处理/info的方法吗?应该返回什么东西才是basic information。啥都没说。操蛋

展开
收起
爱吃鱼的程序员 2020-06-04 16:30:06 1141 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    自己不需要处理/info,spring自动处理了:

    org.springframework.web.socket.sockjs.support.AbstractSockJsService

    ######回复 @bf109 : 知道了 我忘了写项目名了:joy: http://localhost:8080/fendou-jsnu/jsnu-websocket/info?t=1561515561803######大佬 这个该怎么设置啊?
    2020-06-04 17:10:31
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载