use-header 0.0.1

Small HTTP header utilities for RustUse
Documentation
  • Coverage
  • 83.33%
    10 out of 12 items documented1 out of 10 items with examples
  • Size
  • Source code size: 7.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 345.78 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 34s Average build duration of successful builds.
  • all releases: 34s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-web
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-header

Small HTTP header utilities for RustUse.

Experimental

use-header is experimental while the use-web workspace remains below 0.3.0. Expect small API adjustments during the first release wave.

Example

use use_header::{get_header, parse_headers};

let headers = parse_headers("Content-Type: text/plain\nX-Trace: abc123");

assert_eq!(get_header(&headers, "content-type").as_deref(), Some("text/plain"));

Scope

  • Header-name normalization and validation.
  • Small helpers for parsing plain-text header blocks.
  • Mutable helpers for setting and removing header values.

Non-goals

  • Full HTTP parsing.
  • HTTP/2 or HTTP/3 frame handling.
  • Client or server implementations.

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license