BaseFetchInterception
open class BaseFetchInterception(tab: Tab, val urlPattern: String, val requestStage: Fetch.RequestStage, val resourceType: Network.ResourceType) : FetchInterception
Default implementation of FetchInterception.
Constructors
Link copied to clipboard
constructor(tab: Tab, urlPattern: String, requestStage: Fetch.RequestStage, resourceType: Network.ResourceType)
Functions
Link copied to clipboard
open suspend override fun continueRequest(url: String?, method: String?, postData: String?, headers: List<Fetch.HeaderEntry>?, interceptResponse: Boolean?)
Continues the request, optionally modifying some of its parameters.
Link copied to clipboard
open suspend override fun continueResponse(responseCode: Int?, responsePhrase: String?, responseHeaders: List<Fetch.HeaderEntry>?, binaryResponseHeaders: String?)
Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.
Link copied to clipboard
Causes the request to fail with specified reason.
Link copied to clipboard
open suspend override fun fulfillRequest(responseCode: Int, responseHeaders: List<Fetch.HeaderEntry>?, binaryResponseHeaders: String?, body: String?, responsePhrase: String?)
Provides response to the request.
Link copied to clipboard
Fetches the raw response body once it has been received.
Link copied to clipboard
Returns the request event once it has been received.
Link copied to clipboard
Fetches the response body once it has been received.