Skip to main content

HttpClient

Trait HttpClient 

Source
pub trait HttpClient {
    type Error: Error + Send + Sync;

    // Required method
    fn request(
        &self,
        req: Request<Vec<u8>>,
    ) -> Result<Response<Vec<u8>>, Self::Error>;
}
Expand description

Perform an HTTP request and return the response.

Users of this crate must provide an implementation of this trait using an HTTP crate such as curl, reqwest, etc.

Required Associated Types§

Required Methods§

Source

fn request( &self, req: Request<Vec<u8>>, ) -> Result<Response<Vec<u8>>, Self::Error>

Implementors§