Trait HyperHttpClientExt

Source
pub trait HyperHttpClientExt {
    // Required methods
    fn http_get(
        &self,
        uri: &str,
    ) -> impl Future<Output = Result<Vec<u8>, HttpError>>;
    fn http_request<T: Body + 'static>(
        &self,
        request: Request<T>,
    ) -> impl Future<Output = Result<Vec<u8>, HttpError>>
       where T::Data: Send,
             T::Error: Error + Send + Sync;
}

Required Methods§

Source

fn http_get( &self, uri: &str, ) -> impl Future<Output = Result<Vec<u8>, HttpError>>

Source

fn http_request<T: Body + 'static>( &self, request: Request<T>, ) -> impl Future<Output = Result<Vec<u8>, HttpError>>
where T::Data: Send, T::Error: Error + Send + Sync,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HyperHttpClientExt for AsyncWorld

Extension methods for making web request.

Source§

async fn http_get(&self, uri: &str) -> Result<Vec<u8>, HttpError>

Compose a quick get request and obtain the result.

Source§

async fn http_request<T: Body + 'static>( &self, request: Request<T>, ) -> Result<Vec<u8>, HttpError>
where T::Data: Send, T::Error: Error + Send + Sync,

Compose a http request and obtain the result.

Implementors§