如何使用Firebug或其他方式查看WS/WSS Websocket请求内容? [英] How to view WS/WSS Websocket request content using Firebug or other?

查看:311
本文介绍了如何使用Firebug或其他方式查看WS/WSS Websocket请求内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以查看Websocket流量?

Is there a way to view the Websocket traffic?

在初始握手中仅可见Websocket标头.

Only Websocket headers are visible on the initial handshake.

响应后一切都消失了

Connection  Upgrade
Sec-WebSocket-Accept    EQqklpK6bzlgAAOL2EFX/nx8bEI=
Upgrade WebSocket

我已经尝试过Firebug,Live Headers和Fiddler2来跟踪交换,但它们都停止在那里记录.

I've tried Firebug, Live Headers, and Fiddler2 to trace the exchange and they all stop logging there.

推荐答案

尝试使用Chrome的开发人员工具

Try Chrome's developer tools,

  1. 点击网络"标签
  2. 使用底部的过滤器仅显示WebSocket连接)
  3. 选择所需的websocket连接,
  4. 请注意,其中有标题",预览",响应"等子选项卡 右边
  5. 一旦数据开始流动,将出现"WebSocket框架"子选项卡. 记录任何方向的所有数据.非常有用.
  1. click 'Network' tab
  2. use the filters at the bottom to show only WebSocket connections),
  3. select the desired websocket connection,
  4. note that there are 'Headers', 'Preview', 'Response', etc. sub-tabs to the right,
  5. once data starts flowing a 'WebSocket Frames' subtab will appear. All data going in either direction is logged. Very informative.

这篇关于如何使用Firebug或其他方式查看WS/WSS Websocket请求内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆