#parse-url #uri #url #parser #bar #pathetic

pathetic

Relative URI library for Rust, based on the url crate

4 releases (2 breaking)

0.3.0 Mar 18, 2020
0.2.1 Mar 16, 2020
0.2.0 Mar 13, 2020
0.1.0 Mar 6, 2020

#1530 in HTTP server

Download history 14/week @ 2024-12-14 7/week @ 2025-01-11 23/week @ 2025-01-18 3/week @ 2025-01-25 13/week @ 2025-02-01 71/week @ 2025-02-08 69/week @ 2025-02-15 24/week @ 2025-02-22 16/week @ 2025-03-01 16/week @ 2025-03-08 23/week @ 2025-03-15 7/week @ 2025-03-22 5/week @ 2025-03-29

52 downloads per month

MIT license

10KB
158 lines

pathetic

Docs Crates.io

A library for working with relative URIs, based on the url crate.

Usage:

fn main() {
    let uri = pathetic::Uri::default()
        .with_path_segments_mut(|p| p.extend(&["foo", "bar"]))
        .with_query_pairs_mut(|q| q.append_pair("foo", "bar"))
        .with_fragment(Some("baz"));

    assert_eq!("/foo/bar?foo=bar#baz", uri.as_str());
}

Current version: 0.3.0

License: MIT

Dependencies

~2–7.5MB
~143K SLoC