net-cat 0.1.0

Minimal hand-rolled HTTP/1.1 client over std::net::TcpStream. Plain HTTP only in v0 (no TLS); used to give web-api-cat's fetch a concrete backend. No external HTTP crate; all parsing and framing are local. No mut beyond the FFI carve-out for TcpStream::read_to_end. Sixth sub-crate of a Servo-replacement webview runtime targeting Tauri.
docs.rs failed to build net-cat-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

net-cat

Minimal hand-rolled HTTP/1.1 client over std::net::TcpStream. Plain HTTP only in v0 (no TLS).

net-cat is the sixth sub-crate of a comp-cat-rs Servo-replacement webview runtime targeting Tauri integration. It gives web-api-cat's fetch binding a concrete backend without pulling an external HTTP crate.

Example

use net_cat::{Method, Request, Url};

let url = Url::parse("http://example.com/").unwrap();
let request = Request::new(Method::Get, url).with_header("Accept", "text/html");
// fetch(&request) would perform a real network call -- not exercised in
// the doctest to keep `cargo test` offline.

v0 scope

  • Method (GET/POST/PUT/DELETE/HEAD/OPTIONS/PATCH).
  • Url parser (http://host[:port]/path?query; https:// returns Error::UnsupportedScheme).
  • Headers (case-insensitive name lookup, ordered list).
  • Request and Response with status, headers, body bytes.
  • fetch(request) -- TCP connect, write request, read until EOF (forced Connection: close), parse response.
  • Automatic Host, User-Agent, Content-Length headers.

Deferred to v0.2+

  • HTTPS / TLS via rustls behind a feature flag.
  • Connection keep-alive / pooling.
  • Chunked transfer encoding (we rely on Connection: close + read-to-EOF).
  • Redirects, cookies, streaming bodies.
  • Async API.

License

MIT OR Apache-2.0