android-components / mozilla.components.concept.engine.request / RequestInterceptor

RequestInterceptor

interface RequestInterceptor (source)

Interface for classes that want to intercept load requests to allow custom behavior.

Types

ErrorResponse

data class ErrorResponse

An alternative response for an error request.

InterceptionResponse

data class InterceptionResponse

An alternative response for an intercepted request.

Functions

onErrorRequest

open fun onErrorRequest(session: EngineSession, errorType: ErrorType, uri: String?): ErrorResponse?

A request that the engine wasn't able to handle that resulted in an error.

onLoadRequest

open fun onLoadRequest(session: EngineSession, uri: String): InterceptionResponse?

A request to open an URI. This is called before each page load to allow custom behavior implementation.