[go: up one dir, main page]

hoot/
lib.rs

1//! WARNING: The hoot crate is discontinued and types moved to `ureq-proto`.
2
3// Sans-IO HTTP/1.1 library.
4//
5// hoot is a library that implements the HTTP/1.1 protocol without considering transport.
6// The goal is to make a first class HTTP/1.1 implementation that can be used in other projects
7// that add socket handling, cookies, body compression, JSON etc.
8//
9// # In scope:
10//
11// * First class HTTP/1.1 protocol implementation
12// * Indication of connection states (such as when a connection must be closed)
13// * transfer-encoding: chunked
14// * Redirect handling (building URI and amending requests)
15//
16// # Out of scope:
17//
18// * Opening/closing sockets
19// * TLS (https)
20// * Cookie jars
21// * Authorization
22// * Body data transformations (charset, compression etc)
23//
24// The project is run as a companion project to [ureq](https://crates.io/crates/ureq),
25// specifically the [ureq 3.x rewrite](https://github.com/algesten/ureq/pull/762)
26//
27// # The http crate
28//
29// hoot is based on the [http crate](https://crates.io/crates/http) - a unified HTTP API for Rust.
30//
31
32#![forbid(unsafe_code)]
33#![warn(clippy::all)]
34#![allow(clippy::uninlined_format_args)]
35#![deny(missing_docs)]
36
37#[macro_use]
38extern crate log;
39
40// Re-export the basis for this library.
41pub use http;
42
43mod error;
44pub use error::Error;
45
46mod chunk;
47mod ext;
48mod util;
49
50mod body;
51pub use body::BodyMode;
52
53pub mod client;
54
55/// Low level HTTP parser
56///
57/// This is to bridge `httparse` crate to `http` crate.
58pub mod parser;
59
60#[doc(hidden)]
61pub use util::ArrayVec;