Type Alias ruma_client::http_client::Hyper

source ·
pub type Hyper<C = HttpConnector> = Client<C, Full<Bytes>>;
Available on crate feature hyper only.
Expand description

A hyper HTTP client.

The default connector is rarely useful, since it doesn’t support https.

Aliased Type§

struct Hyper<C = HttpConnector> { /* private fields */ }

Trait Implementations§


impl DefaultConstructibleHttpClient for Hyper


fn default() -> Self

Creates a new HTTP client with default configuration.

impl<C> HttpClient for Hyper<C>
where C: Connect + Clone + Send + Sync + 'static,


type RequestBody = BytesMut

The type to use for try_into_http_request.

type ResponseBody = Bytes

The type to use for try_from_http_response.

type Error = Box<dyn Error + Sync + Send>

The error type for the send_request function.

async fn send_http_request( &self, req: Request<BytesMut> ) -> Result<Response<Bytes>, Self::Error>

Send an http::Request to get back an http::Response.