#parse-url #lib #parser

miniurl

miniurl is a url parser lib for rust

4 releases

Uses old Rust 2015

0.1.3 Aug 17, 2017
0.1.2 Aug 13, 2017
0.1.1 Aug 13, 2017
0.1.0 Aug 12, 2017

#41 in #parse-url

26 downloads per month
Used in 2 crates

MIT/Apache

10KB
172 lines

miniurl is url parser lib for rust,is simple and easy.

Examples

use miniurl::Url;

let url = Url::parse("http://admin:password@google.com/foo?a=1&b=2#top");
assert_eq!(url.scheme, "http");
assert_eq!(url.netloc, "admin:password@google.com");
assert_eq!(url.path, "/foo");
assert_eq!(url.query, Some("a=1&b=2".to_string()));
assert_eq!(url.fragment, Some("top".to_string()));
assert_eq!(url.username, Some("admin".to_string()));
assert_eq!(url.password, Some("password".to_string()));
assert_eq!(url.host, Some("google.com".to_string()));
assert_eq!(url.port, 80);

No runtime deps