Skip to main content

Module target

Module target 

Source
Expand description

Request target components. Schemes and HTTP hosts are case-insensitive, so schemes and authorities are stored in lowercase (RFC 3986, sections 3.1 and 6.2.2.1; RFC 9110, section 4.2.3); paths are preserved as supplied. Percent-encoded authority bytes are lowercased too, which is equivalent though RFC 3986 prefers uppercase hexadecimal digits. Drivers validate target combinations and wire syntax before transmission.

Structsยง

Authority
A lowercase request authority, such as example.com:8080. HTTP authorities are a case-insensitive host and an optional port, so conversions lowercase ASCII letters. Comparisons, hashing and map lookups with str use the lowercase text.
Path
A request path with optional query, or another supplied request-target form. Paths are case-sensitive and preserved as supplied.
Scheme
A lowercase request scheme. http and https in any case use borrowed constants; other schemes are lowercased when converted. Comparisons with str use the lowercase text.