We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0248030 commit 742a6d2Copy full SHA for 742a6d2
README.md
@@ -2,3 +2,25 @@
2
3
Fast [WHATWG specification](https://url.spec.whatwg.org) compliant URL parser for Rust.
4
5
+### Usage
6
+
7
+Add the following as a dependency to your project (`Cargo.toml`):
8
9
+```
10
+[dependencies]
11
+ada-url = { git = "https://github.com/ada-url/rust" }
12
13
14
+Here is an example illustrating a common usage:
15
+```Rust
16
+use ada_url::Url;
17
+fn main() {
18
+ let mut u = Url::parse("http://www.google:8080/love#drug", None).expect("bad url");
19
+ println!("port: {:?}", u.port());
20
+ println!("hash: {:?}", u.hash());
21
+ println!("pathname: {:?}", u.pathname());
22
+ println!("href: {:?}", u.href());
23
+ u.set_port("9999");
24
25
+}
26
0 commit comments