WebSocketMessage | mockttp

Interface WebSocketMessage

Properties

content

content: Uint8Array

The contents of the message as a raw buffer. This is already decompressed, if the WebSocket uses compression.

direction

direction: "sent" | "received"

Whether the message was sent by Mockttp, or received from a Mockttp client.

eventTimestamp

eventTimestamp: number

isBinary

isBinary: boolean

Whether this is a string message or a raw binary data message.

streamId

streamId: string

The id of this websocket stream. This will match the id of the request, the initial connection response, and any other WebSocket events for the same connection stream.

tags

tags: string[]

timingEvents