这个网站可以测试websocket: https://www.websocket.org/echo.html
我们可以两个方法去看数据:
1. Google Chrome
Chrome在network tab可以看到这个websocket,frames可以看到data
在4.5版本中,可以加入额外的代码到custom js中:Rules > Customize Rules and add the following function inside your Handlers class,使得websocket数据显示在Log中:
static function OnWebSocketMessage(oMsg: WebSocketMessage) {
// Log Message to the LOG tab
FiddlerApplication.Log.LogString(oMsg.ToString());
/*
// Modify a message's content var sPayload = oMsg.PayloadAsString();
if (sPayload.Contains("time")) {
oMsg.SetPayload(sPayload + "... bazinga!");
}
*/
}
FiddlerApplication.Log.LogString(oMsg.ToString());
/*
// Modify a message's content var sPayload = oMsg.PayloadAsString();
if (sPayload.Contains("time")) {
oMsg.SetPayload(sPayload + "... bazinga!");
}
*/
}