pl.wendigo.chrome.api.fetch

Package pl.wendigo.chrome.api.fetch

Contains DevTools Protocol Fetch domain implementation accessible via FetchOperations class.

Types

AuthChallenge

data class AuthChallenge

Authorization challenge for HTTP status code 401 or 407.

AuthChallengeResponse

data class AuthChallengeResponse

Response to an AuthChallenge.

AuthRequiredEvent

data class AuthRequiredEvent : Event

Issued when the domain is enabled with handleAuthRequests set to true. The request is paused until client responds with continueWithAuth.

ContinueRequestRequest

data class ContinueRequestRequest

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

ContinueWithAuthRequest

data class ContinueWithAuthRequest

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

EnableRequest

data class EnableRequest

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

FailRequestRequest

data class FailRequestRequest

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

FetchOperations

class FetchOperations

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

FulfillRequestRequest

data class FulfillRequestRequest

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

GetResponseBodyRequest

data class GetResponseBodyRequest

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

GetResponseBodyResponse

data class GetResponseBodyResponse

Represents response frame that is returned from Fetch#getResponseBody operation call. Causes the body of the response to be received from the server and returned as a single string. May only be issued for a request that is paused in the Response stage and is mutually exclusive with takeResponseBodyForInterceptionAsStream. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior.

HeaderEntry

data class HeaderEntry

Response HTTP header entry

RequestPattern

data class RequestPattern

RequestPausedEvent

data class RequestPausedEvent : Event

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.

RequestStage

enum class 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.

TakeResponseBodyAsStreamRequest

data class TakeResponseBodyAsStreamRequest

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

TakeResponseBodyAsStreamResponse

data class TakeResponseBodyAsStreamResponse

Represents response frame that is returned from Fetch#takeResponseBodyAsStream operation call. Returns a handle to the stream representing the response body. The request must be paused in the HeadersReceived stage. Note that after this command the request can't be continued as is -- client either needs to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. This method is mutually exclusive with getResponseBody. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior.

Type Aliases

RequestId

typealias RequestId = String

Unique request identifier.