puppeteer/new-docs/puppeteer.protocol.fetch.md
2020-07-13 14:01:35 +01:00

2.7 KiB

Home > puppeteer > Protocol > Fetch

Protocol.Fetch namespace

A domain for letting clients substitute browser's network layer with client code.

Signature:

export namespace Fetch 

Interfaces

Interface Description
AuthChallenge Authorization challenge for HTTP status code 401 or 407.
AuthChallengeResponse Response to an AuthChallenge.
AuthRequiredEvent Issued when the domain is enabled with handleAuthRequests set to true. The request is paused until client responds with continueWithAuth.
ContinueRequestRequest
ContinueWithAuthRequest
EnableRequest
FailRequestRequest
FulfillRequestRequest
GetResponseBodyRequest
GetResponseBodyResponse
HeaderEntry Response HTTP header entry
RequestPattern
RequestPausedEvent Issued when the domain is enabled and the request URL matches the specified filter. The request is paused until the client responds with one of continueRequest, failRequest or fulfillRequest. The stage of the request can be determined by presence of responseErrorReason and responseStatusCode -- the request is at the response stage if either of these fields is present and in the request stage otherwise.
TakeResponseBodyAsStreamRequest
TakeResponseBodyAsStreamResponse

Type Aliases

Type Alias Description
RequestId Unique request identifier.
RequestStage Stages of the request to handle. Request will intercept before the request is sent. Response will intercept after the response is received (but before response body is received.