Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/mod.ts>Protocol.Network.Request

Headless Chrome Deno API
Latest
interface Protocol.Network.Request
import { type Protocol } from "https://deno.land/x/pptr@1.2.0/mod.ts";
const { Request } = Protocol.Network;

HTTP request data.

Properties

url: string

Request URL (without fragment).

optional
urlFragment: string

Fragment of the requested URL starting with hash, if present.

method: string

HTTP request method.

headers: Headers

HTTP request headers.

optional
postData: string

HTTP POST request data.

optional
hasPostData: boolean

True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.

optional
postDataEntries: PostDataEntry[]

Request body elements. This will be converted from base64 to binary

optional
mixedContentType: Security.MixedContentType

The mixed content type of the request.

initialPriority: ResourcePriority

Priority of the resource request at the time request is sent.

referrerPolicy:
| "unsafe-url"
| "no-referrer-when-downgrade"
| "no-referrer"
| "origin"
| "origin-when-cross-origin"
| "same-origin"
| "strict-origin"
| "strict-origin-when-cross-origin"

The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ (RequestReferrerPolicy enum)

optional
isLinkPreload: boolean

Whether is loaded via link preload.

optional
trustTokenParams: TrustTokenParams

Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.