Record Replay Protocol

Methods

Network.findRequests

Query the recording for all network data that is available, returning once all 'Network.requests' events have been dispatched.

Network.getRequestBody

Query the recording for all of the parts of this request body. The server will emit 'requestBodyData' events for all parts, and this command will not complete until all parts have been sent.

NOTE: This command will fail if the focus window changes while it is running.

parameters
id
RequestId

The id of the request to load.

range
BodyRange

The range of data to fetch from the body.

Network.getResponseBody

Query the recording for all of the parts of this response body. The server will emit 'responseBodyData' events for all parts, and this command will not complete until all parts have been sent.

NOTE: This command will fail if the focus window changes while it is running.

parameters
id
RequestId

The id of the request to load.

range
BodyRange

The range of data to fetch from the body.

Events

Network.requestBodyData

Emit data about a request body as it is processed. Parts are not guaranteed to be emitted in order.

parameters
id
RequestId

The id of the request to the body belongs to.

parts
array[ RequestBodyData ]

Pieces of data belonging to the request body.

Network.requests

Describe some requests that were dispatched by the recording.

NOTE: There is no guarantee that request information will be available before the request event info, so all temporal combinations should be supported when processing this data.

parameters
requests
array[ RequestInfo ]

A list of requests found in the recording.

events
array[ RequestEventInfo ]

A list of request event data found in the recording.

Network.responseBodyData

Emit data about a response body as it is processed. Parts are not guaranteed to be emitted in order.

parameters
id
RequestId

The id of the request to the body belongs to.

parts
array[ ResponseBodyData ]

Pieces of data belonging to the response body.

Types

Network.BodyData

A piece of request/response data. Currently only base64-encoded binary data, but may be expanded in the future to handle websockets and other data stream types.

Type: object

properties
offset
integer

The inclusive start location of the data.

length
integer

The length of the data.

value
string

A string containing the data.

Network.BodyRange

The range offsets within a request/response body.

Type: object

properties
start
integer

The inclusive start location of the data. Defaults to zero.

end
integer

The exclusive end location of the data. Defaults to the length of the data.

Network.Header

An HTTP header key/value pair.

Type: object

properties
name
string

The header name.

value
string

The header value.

Network.RequestBodyData

A piece of data from the request body.

Type: BodyData

properties
point
Recording.TimeStampedPoint

The point where the this piece of request data was sent, for example if the request body was generated from a stream, or as many separate websocket messages.

Network.RequestBodyEvent

An event representing the presence of a request body for this request, indicating a Network.getRequestBody command will not throw an error for this request.

Type: object

properties
kind
"request-body"

A tagged-union identifier for this event.

Network.RequestDestinationEvent

An event representing information about the request's destination.

Type: object

properties
kind
"request-destination"

A tagged-union identifier for this event.

destinationAddress
string

The IP address of the destination.

destinationPort
number

The port number of the destination.

Network.RequestDoneEvent

An event representing the request having completed.

Type: object

properties
kind
"request-done"

A tagged-union identifier for this event.

encodedBodySize
number

The number of bytes transferred for the body.

decodedBodySize
number

The number of bytes after content decoding. Null if the data didn't have a content-encoding.

Network.RequestEvent

A tagged union type of all of the request events. Use 'kind' to differentiate the events.

Type: object

Network.RequestEventInfo

The basic information about events emitted by a request.

Type: object

properties
id
RequestId

The unique identifier for the request this event is associated with.

time
number

The time that the info appeared.

event
RequestEvent

Data about the event that occured.

Network.RequestFailedEvent

An event representing the request having failed.

Type: object

properties
kind
"request-failed"

A tagged-union identifier for this event.

requestFailedReason
string

A short description of the cause of the failure.

Network.RequestId

The string id of a request.

Type: string

Network.RequestInfo

The basic information about a request.

Type: Recording.TimeStampedPoint

properties
id
RequestId

The unique identifier for this request.

triggerPoint
Recording.TimeStampedPoint

The point where the request was initiated. The same point may trigger multiple requests, such as in the case of a request that redirects.

Network.RequestInitiator

Information about the location where a request was initiated from.

Type: object

properties
url
string

URL responsible for triggering the request.

line
integer

1-indexed line in the URL where the request was initiated, if known.

column
integer

0-indexed column in the URL where the request was initiated, if known.

Network.RequestOpenEvent

An event representing the beginning of a request.

Type: object

properties
kind
"request"

A tagged-union identifier for this event.

requestUrl
string

The URL being loaded by the request.

requestMethod
string

The HTTP method used for the request.

requestHeaders
array[ Header ]

The HTTP headers sent with the request.

requestCause
string

A short string identifying the cause of the request, e.g. 'img', 'fetch', 'document', and so on

initiator
RequestInitiator

Any information about where the request was initiated from.

Network.RequestRawHeaderEvent

An event representing the request having sent raw headers.

Type: object

properties
kind
"request-raw-headers"

A tagged-union identifier for this event.

requestRawHeaders
string

The raw HTTP header that was sent with the request.

Network.RequestResponseBodyEvent

An event representing the presence of a response body for this request, indicating a Network.getResponseBody command will not throw an error for this request.

Type: object

properties
kind
"response-body"

A tagged-union identifier for this event.

Network.RequestResponseEvent

An event representing the response to a request being received.

Type: object

properties
kind
"response"

A tagged-union identifier for this event.

responseHeaders
array[ Header ]

The HTTP headers sent with the response.

responseProtocolVersion
string

The HTTP version of the response.

responseStatus
number

The HTTP status code of the response.

responseStatusText
string

The HTTP status text of the response.

responseFromCache
boolean

Indicates whether the response was served from cache.

Network.RequestResponseRawHeaderEvent

An event representing the response having received raw headers.

Type: object

properties
kind
"response-raw-headers"

A tagged-union identifier for this event.

responseRawHeaders
string

The raw HTTP header that was sent with the response.

Network.ResponseBodyData

A piece of data from the response body.

Type: BodyData