Package-level declarations

Types

Link copied to clipboard
open class BaseFetchInterception(tab: Tab, val urlPattern: String, val requestStage: Fetch.RequestStage, val resourceType: Network.ResourceType) : FetchInterception

Default implementation of FetchInterception.

Link copied to clipboard
open class BaseRequestExpectation(tab: Tab, val urlPattern: Regex) : RequestExpectation

Default implementation of RequestExpectation.

Link copied to clipboard
data class EncodedBody(val body: String, val base64Encoded: Boolean)

Represents an encoded body of a network response.

Link copied to clipboard

Base class to wait for a Fetch response matching a URL pattern. Use this to collect and decode a paused fetch response, while keeping the use block clean and returning its own result.

Link copied to clipboard

Base class for handling request and response expectations. This class provides a context manager to wait for specific network requests and responses based on a URL pattern. It sets up handlers for request and response events and provides properties to access the request, response, and response body.

Functions

Link copied to clipboard
inline suspend fun <T> FetchInterception.getResponseBody(): T
inline suspend fun <T> RequestExpectation.getResponseBody(): T

Fetches the response body once it has been received.