tez 0.0.3

A lightweight, ergonomic, and fast high-level HTTP client for Rust
Documentation
#![doc = include_str!("../README.md")]

/// Authentication for Tez clients and requests.
pub mod auth;
pub mod blocking;
mod body;
mod client;
mod compression;
mod config;
pub mod connection;
mod content;
#[cfg(feature = "cookies")]
mod cookies;
mod dispatch;
pub mod dns;
mod error;
mod event;
mod multipart;
pub mod proxy;
pub mod redirect;
mod request;
mod response;
pub mod retry;
pub mod runtime;
mod stream;
pub mod tls;
mod transport;
mod upgrade;

/// An owned body for Tez requests and responses.
pub use body::Body;
/// An efficient immutable byte buffer for buffered HTTP data.
pub use bytes::Bytes;
/// The reusable HTTP client and its configuration builder.
pub use client::{Client, ClientBuilder};
/// Validated resource and time bounds for a client.
pub use config::{Limits, Timeouts};
#[cfg(feature = "cookies")]
pub use cookies::CookieJar;
/// Tez's owned error type and specialized result alias.
pub use error::{Error, Result};
/// One logical event decoded from a streaming response.
pub use event::Event;
/// The standard HTTP request type for explicit request construction before it
/// carries a [`Body`].
pub use http::Request as HttpRequest;
/// Standard HTTP types used throughout Tez's public API.
pub use http::{HeaderMap, HeaderName, HeaderValue, Method, StatusCode, Uri, Version, header};
/// The standard streaming body trait and frame types implemented by [`Body`].
pub use http_body::{Body as HttpBody, Frame, SizeHint};
/// Extensions for reading frames from a standard streaming body.
pub use http_body_util::BodyExt;
/// Owned multipart request bodies and their parts.
pub use multipart::{Multipart, Part};
/// Fluent construction of one request sent through a [`Client`].
pub use request::RequestBuilder;
/// A final response with streaming body access and bounded consumers.
pub use response::{Response, ResponseInfo};
/// Runtime capabilities for Tez clients and connection drivers.
pub use runtime::{Executor, Runtime, Timer};
/// One-shot response byte, JSON, and server-sent event streams.
pub use stream::{EventStream, JsonStream, ResponseStream};
/// Runtime-neutral HTTP protocol upgrade types.
pub use upgrade::{Upgrade, Upgraded};

/// A detached standard HTTP request carrying a Tez [`Body`].
///
/// Build this with [`RequestBuilder::build`] when it is useful to inspect or
/// retain the request before passing it to [`Client::send`].
pub type Request = http::Request<Body>;