authority.rs |
|
20830 |
builder.rs |
|
5116 |
mod.rs |
URI component of request and response lines
This module primarily contains the `Uri` type which is a component of all
HTTP requests and also reexports this type at the root of the crate. A URI
is not always a "full URL" in the sense of something you'd type into a web
browser, but HTTP requests may only have paths on servers but may have full
schemes and hostnames on clients.
# Examples
```
use http::Uri;
let uri = "/foo/bar?baz".parse::<Uri>().unwrap();
assert_eq!(uri.path(), "/foo/bar");
assert_eq!(uri.query(), Some("baz"));
assert_eq!(uri.host(), None);
let uri = "https://www.rust-lang.org/install.html".parse::<Uri>().unwrap();
assert_eq!(uri.scheme_str(), Some("https"));
assert_eq!(uri.host(), Some("www.rust-lang.org"));
assert_eq!(uri.path(), "/install.html");
``` |
31446 |
path.rs |
|
16420 |
port.rs |
|
3288 |
scheme.rs |
|
10931 |
tests.rs |
|
11169 |