import { HTTPRequest } from "https://deno.land/x/frugal@0.9.6/dep/puppeteer/mod.ts";
Represents an HTTP request sent by a page.
Constructors
new
HTTPRequest(client: CDPSession,
frame: Frame | null,
interceptionId: string | undefined,
allowInterception: boolean,
event: Protocol.Network.RequestWillBeSentEvent,
redirectChain: HTTPRequest[],
Properties
_redirectChain: HTTPRequest[]
_response: HTTPResponse | null
readonly
client: CDPSessionWarning! Using this client can break Puppeteer. Use with caution.
Methods
abortErrorReason(): Protocol.Network.ErrorReason | null
continue(overrides?: ContinueRequestOverrides, priority?: number): Promise<void>
Continues request with optional request overrides.
enqueueInterceptAction(pendingHandler: () => void | PromiseLike<unknown>): void
Adds an async request handler to the processing queue. Deferred handlers are not guaranteed to execute in any particular order, but they are guaranteed to resolve before the request interception is finalized.
failure(): { errorText: string; } | null
Access information about the request's failure.
finalizeInterceptions(): Promise<void>
Awaits pending interception handlers and then decides how to fulfill the request interception.
headers(): Record<string, string>
initiator(): Protocol.Network.Initiator
isInterceptResolutionHandled(): boolean
method(): string
postData(): string | undefined
redirectChain(): HTTPRequest[]
A redirectChain
is a chain of requests initiated to fetch a resource.
Contains the request's resource type as it was perceived by the rendering engine.
respond(response: Partial<ResponseForRequest>, priority?: number): Promise<void>
Fulfills a request with the given response.
response(): HTTPResponse | null
responseForRequest(): Partial<ResponseForRequest> | null
url(): string