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::{Client, ClientBuilder, RequestBuilder, TokioExecutor};
15pub use self::body::{shared::SharedBody, RequestBody};
16pub use self::connector::{
17    ConnectError, HttpConnection, HttpConnector, HyperConnectorAdapter, NetworkConnection,
18    NetworkConnector, NetworkStream,
19};
20pub use self::error::{Error, HyperClientError};
21pub use self::util::{aggregate, to_bytes};
22pub use hyper_util::rt::TokioTimer;
23
24pub use hyper::body::{Body, Buf, Bytes, Incoming};
25pub use hyper::{self, Method, StatusCode, Uri, Version};
26pub use hyper_util::client::legacy::{Builder as HyperClientBuilder, Client as HyperClient};
27pub use tower_service;
28
29pub type Request = hyper::Request<RequestBody>;
30pub type Response = hyper::Response<Incoming>;
31
32pub mod compat {
33    pub use hyper_util::client::legacy::connect::{Connected, Connection};
34}
35
36#[doc(hidden)]
37pub mod connector_impl;