Package-level declarations

Types

Link copied to clipboard

Batch expectation built on top of BaseRequestExpectation instances.

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

Represents a batch of request expectations, each defined by a URL pattern and its corresponding expectation.

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

Decompresses a Gzip compressed byte array.

Link copied to clipboard

Decompresses the byte array if it is compressed using Zstd or Gzip compression.

Link copied to clipboard

Decompresses a Zstd compressed byte array.

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.

Link copied to clipboard

Checks if the byte array is compressed using Gzip compression.

Link copied to clipboard

Checks if the byte array is compressed using Zstandard (Zstd) compression.