pl.wendigo.chrome.api.fetch / FulfillRequestRequest

FulfillRequestRequest

data class FulfillRequestRequest (source)

Represents request frame that can be used with Fetch#fulfillRequest operation call.

Provides response to the request.

Link
Fetch#fulfillRequest method documentation.

See Also

FetchOperations.fulfillRequest

Constructors

<init>

FulfillRequestRequest(requestId: RequestId, responseCode: Int, responseHeaders: List<HeaderEntry>? = null, binaryResponseHeaders: String? = null, body: String? = null, responsePhrase: String? = null)

Represents request frame that can be used with Fetch#fulfillRequest operation call.

Properties

binaryResponseHeaders

val binaryResponseHeaders: String?

Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text.

body

val body: String?

A response body.

requestId

val requestId: RequestId

An id the client received in requestPaused event.

responseCode

val responseCode: Int

An HTTP response code.

responseHeaders

val responseHeaders: List<HeaderEntry>?

Response headers.

responsePhrase

val responsePhrase: String?

A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.