oauth2

Trait SyncHttpClient

Source
pub trait SyncHttpClient {
    type Error: Error + 'static;

    // Required method
    fn call(&self, request: HttpRequest) -> Result<HttpResponse, Self::Error>;
}
Expand description

A synchronous (blocking) HTTP client.

Required Associated Types§

Source

type Error: Error + 'static

Error type returned by HTTP client.

Required Methods§

Source

fn call(&self, request: HttpRequest) -> Result<HttpResponse, Self::Error>

Perform a single HTTP request.

Implementors§

Source§

impl<E, T> SyncHttpClient for T
where E: Error + 'static, T: Fn(HttpRequest) -> Result<HttpResponse, E>,

Source§

type Error = E