Middleware

interface Middleware

interface to do interceptions at http calls. It can modify each request and handles all responses in a specified way.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun enrichRequest(request: Request): Request

enriches requests with additional information. E.g. it could append special header-information, which are needed for authentication.

Link copied to clipboard
abstract suspend fun handleResponse(response: Response): Response

handles responses. E.g. it could handle specific status-codes and log error messages.

Link copied to clipboard

stops propagation of a response to the following Middlewares in the chain