net-cat 0.3.0

Minimal hand-rolled HTTP/1.1 client over std::net::TcpStream. v0.3.0 adds chunked-transfer decoding (`Transfer-Encoding: chunked` responses now yield the correct decoded body) and a redirect follower in `fetch` (RFC 7231 §6.4: 301/302/303 downgrade non-GET/HEAD to GET and drop the body; 307/308 preserve method + body; cross-origin hops strip `Cookie` and `Authorization`; capped at `MAX_REDIRECTS = 10` hops). Optional `tls` feature still wires rustls + webpki-roots for `https://` URLs. No external HTTP crate. Sixth sub-crate of a Servo-replacement webview runtime targeting Tauri.
//! Minimal hand-rolled HTTP/1.1 client.
//!
//! # Example
//!
//! ```
//! # fn main() -> Result<(), net_cat::Error> {
//! use net_cat::{Method, Request, Url};
//!
//! let url = Url::parse("http://example.com/")?;
//! let request = Request::new(Method::Get, url).with_header("Accept", "text/html");
//! // `fetch(&request)` would perform a real network call -- doctest is
//! // offline-safe, so it's elided.
//! assert_eq!(request.method().as_str(), "GET");
//! # Ok(())
//! # }
//! ```

#![cfg_attr(docsrs, feature(doc_auto_cfg))]
#![allow(clippy::similar_names)]

pub mod error;
pub mod fetch;
pub mod headers;
pub mod method;
pub mod request;
pub mod response;
#[cfg(feature = "tls")]
pub mod tls;
pub mod transport;
pub mod url;

pub use error::Error;
pub use fetch::fetch;
pub use headers::Headers;
pub use method::Method;
pub use request::Request;
pub use response::Response;
pub use url::Url;