Expand description
http and https URLs on the client side, origin-form targets on the
server side (RFC 9110 §4.2, RFC 9112 §3.2, RFC 3986 §3).
Deliberately narrow: a client of this library names an origin and a path, and nothing else a URL can carry has a meaning for it. Userinfo is refused (RFC 9110 §4.2.4 deprecates it, and a credential in a URL ends up in logs); a fragment is dropped (it is never sent, RFC 9110 §7.1); every octet must be visible ASCII, so a caller with a space or a non-ASCII character in a path percent-encodes it first. No percent-decoding and no normalization happen here: the path goes onto the wire exactly as given.
Structs§
- Target
- A parsed absolute URL: the origin and what is sent as the request target.
Enums§
- Scheme
- The two schemes HTTP defines (RFC 9110 §4.2).
Functions§
- parse_
origin_ form - Checks a request target in origin form (RFC 9112 §3.2.1): it starts with
/and holds visible ASCII only.