How to save websocket frames in Chrome

前端 未结 4 1989
迷失自我
迷失自我 2020-12-08 07:18

I am logging websocket traffic using Chrome/Developer Tools. I have no problem to view the websocket frames in network \"Frames\" window, but I can not save all frames (cont

4条回答
  •  伪装坚强ぢ
    2020-12-08 07:49

    From Chrome 76 the HAR file now includes WebSocket messages.

    WebSocket messages in HAR exports

    The _webSocketMessages property begins with an underscore to indicate that it's a custom field.

    ...
    "_webSocketMessages": [
      {
        "type": "send",
        "time": 1558730482.5071473,
        "opcode": 1,
        "data": "Hello, WebSockets!"
      },
      {
        "type": "receive",
        "time": 1558730482.5883863,
        "opcode": 1,
        "data": "Hello, WebSockets!"
      }
    ]
    ...
    

提交回复
热议问题