simple_hyper_client/blocking/
mod.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
7//! This module provides a blocking interface on top of `hyper`'s HTTP client.
8//!
9//! The [`Client`] type in this module spawns a separate thread for running
10//! async tasks. Additionally, since the client holds a connection pool
11//! internally, it is advised that instances be reused as much as possible.
12
13use crate::shared_body::SharedBody;
14
15mod body;
16mod client;
17
18pub use self::body::Body;
19pub use self::client::{Client, ClientBuilder, RequestBuilder};
20
21pub type Request = hyper::Request<SharedBody>;
22pub type Response = hyper::Response<Body>;