Request

Playwright\Network\RequestInterface

Methods

url()

string
function url(): string

method()

string
function method(): string

headers()

array
function headers(): array

headerValue()

?string

Case-insensitive single header value, or null if not present.

function headerValue(string $name): ?string

headersArray()

array

Headers as a list of name/value pairs.

function headersArray(): array

allHeaders()

array

All headers as a map (alias of headers()).

function allHeaders(): array

postData()

?string
function postData(): ?string

postDataJSON()

?array
function postDataJSON(): ?array

resourceType()

string
function resourceType(): string

isNavigationRequest()

bool
function isNavigationRequest(): bool

postDataBuffer()

?string
function postDataBuffer(): ?string

failure()

?array
function failure(): ?array

frame()

?FrameInterface
function frame(): ?FrameInterface

redirectedFrom()

?self
function redirectedFrom(): ?self

redirectedTo()

?self
function redirectedTo(): ?self

response()

?ResponseInterface
function response(): ?ResponseInterface

existingResponse()

?ResponseInterface

The response if it has already arrived, without waiting for one.

function existingResponse(): ?ResponseInterface

serviceWorker()

mixed
function serviceWorker(): mixed

sizes()

array
function sizes(): array

timing()

array
function timing(): array