Crate uhttp_request_target [] [src]

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));

Enums

RequestTarget

A request target that appears in every HTTP request start line.