uhttp_request_target 0.6.0

Parser for classifying HTTP request target
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented1 out of 2 items with examples
  • Size
  • Source code size: 6.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.48 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kchmck/uhttp_request_target.rs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kchmck

This crate provides a parser for classifying an HTTP request line target into one of the 4 types defined for requests. This can then be used to direct how to further process the target.

Examples

use uhttp_request_target::RequestTarget;

assert_eq!("/r/rust".parse(), Ok(RequestTarget::AbsPath));
assert_eq!("https://example.com".parse(), Ok(RequestTarget::AbsUri));
assert_eq!("example.com".parse(), Ok(RequestTarget::Authority));
assert_eq!("*".parse(), Ok(RequestTarget::ServerOptions));