Home Reference Source
public class | source

RequestHandler

Class Responsible For Managing The Captured Request / Responses For A Page

Constructor Summary

Public Constructor
public

Create A New RequestHandler

Member Summary

Private Members
private

To Capture Requests Or Not To Capture Requests

private

Association Of RequestIds To CapturedRequests

Method Summary

Public Methods
public

Get An Iterator Over The Request Id, Request Object Pairs

public

Handles either the Network.requestWillBeSent or the Network.responseReceived events

public

clear()

Remove All Requests

public

Get An Iterator Over The Request Id, Request Object Pairs

public

forEach(iteratee: function, thisArg: *)

Apply An Iteratee Once For Each Mapped Request Id, Request Object Pair

public

get(requestId: string): CapturedRequest

Retrieve The Corresponding Request Object For A Request Id

public

has(requestId: string): boolean

Does The Interceptor Have The Request Object Associated With A Request Id

public
public

Get An Iterator Over The Request Ids

public

Handles the Network.requestWillBeSent event

public

Handles the Network.responseReceived event

public
public

Sets an internal flag to begin capturing network requests.

public

Sets an internal flag to stop the capturing network requests

public

Get An Iterator Over The Request Objects

Public Constructors

public constructor() source

Create A New RequestHandler

Private Members

private _capture: boolean source

To Capture Requests Or Not To Capture Requests

private _requests: Map<string, CapturedRequest> source

Association Of RequestIds To CapturedRequests

Public Methods

public [Symbol.iterator](): Iterator source

Get An Iterator Over The Request Id, Request Object Pairs

Return:

Iterator

See:

public addRequestInfo(info: Object) source

Handles either the Network.requestWillBeSent or the Network.responseReceived events

Params:

NameTypeAttributeDescription
info Object

See:

public clear() source

Remove All Requests

public entries(): Iterator source

Get An Iterator Over The Request Id, Request Object Pairs

Return:

Iterator

public forEach(iteratee: function, thisArg: *) source

Apply An Iteratee Once For Each Mapped Request Id, Request Object Pair

Params:

NameTypeAttributeDescription
iteratee function
  • nullable: false

the function to be applied

thisArg *
  • optional

optional this argument

public get(requestId: string): CapturedRequest source

Retrieve The Corresponding Request Object For A Request Id

Params:

NameTypeAttributeDescription
requestId string
  • nullable: false

Return:

CapturedRequest

public has(requestId: string): boolean source

Does The Interceptor Have The Request Object Associated With A Request Id

Params:

NameTypeAttributeDescription
requestId string
  • nullable: false

Return:

boolean

public * iterateRequests(): Iterator<CDPRequestInfo> source

public keys(): Iterator<string> source

Get An Iterator Over The Request Ids

Return:

Iterator<string>

public requestWillBeSent(info: Object) source

Handles the Network.requestWillBeSent event

Params:

NameTypeAttributeDescription
info Object

See:

public responseReceived(info: Object) source

Handles the Network.responseReceived event

Params:

NameTypeAttributeDescription
info Object

See:

public size(): number source

Return:

number

public startCapturing() source

Sets an internal flag to begin capturing network requests. Clears Any Previously Captured Request Information

public stopCapturing() source

Sets an internal flag to stop the capturing network requests

public values(): Iterator<CapturedRequest> source

Get An Iterator Over The Request Objects