pub trait Interceptor {
    fn before_request(
        &self,
        uri: String,
        opts: RequestInit
    ) -> Result<(String, RequestInit), Error> { ... }
fn after_response(
        &self,
        response: Result<WebResponse, Error>
    ) -> Result<WebResponse, Error> { ... } }
Expand description

Allows to modify and inspect a Request/Response

Provided methods

Called before a request is performed

Called after a response is received and before the body is consumed

Implementors