Skip to main content

simple_hyper_client/
lib.rs

1/* Copyright (c) Fortanix, Inc.
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7mod async_client;
8pub mod blocking;
9mod body;
10mod connector;
11mod error;
12mod util;
13
14pub use self::async_client::*;
15pub use self::body::{shared::SharedBody, RequestBody};
16pub use self::connector::{
17    ConnectError, HttpConnection, HttpConnector, HyperConnectorAdapter, NetworkConnection,
18    NetworkConnector,
19};
20pub use self::error::{Error, HyperClientError};
21pub use self::util::{aggregate, to_bytes};
22
23pub use hyper::body::{Body, Buf, Bytes, Incoming};
24pub use hyper::{self, Method, StatusCode, Uri, Version};
25pub use hyper_util::client::legacy::{Builder as HyperClientBuilder, Client as HyperClient};
26pub use tower_service;
27
28pub type Request = hyper::Request<RequestBody>;
29pub type Response = hyper::Response<Incoming>;
30
31pub mod compat {
32    pub use hyper_util::client::legacy::connect::{Connected, Connection};
33}
34
35#[doc(hidden)]
36pub mod connector_impl;