Skip to main content

HttpService

Trait HttpService 

Source
pub trait HttpService:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn call<'life0, 'async_trait>(
        &'life0 self,
        req: HttpRequest,
    ) -> Pin<Box<dyn Future<Output = Result<HttpResponse, HttpError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

An asynchronous function from a HttpRequest to a HttpResponse.

Required Methods§

Source

fn call<'life0, 'async_trait>( &'life0 self, req: HttpRequest, ) -> Pin<Box<dyn Future<Output = Result<HttpResponse, HttpError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Perform HttpRequest returning HttpResponse

Implementations on Foreign Types§

Source§

impl HttpService for Client

Source§

fn call<'life0, 'async_trait>( &'life0 self, req: HttpRequest, ) -> Pin<Box<dyn Future<Output = Result<HttpResponse, HttpError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§