4 releases
0.2.2 | May 4, 2023 |
---|---|
0.2.1 | May 4, 2023 |
0.1.5 | May 3, 2023 |
#2 in #proper
69 downloads per month
16KB
89 lines
urlcat
Inspired by urlcat
What is this?
This package urlbat rewritten in rust
Features
- sorts the querystring
- correctly escapes values
Simple example showing what it can do
use std::collections::HashMap;
use urlcat::urlcat;
fn main() {
let url = urlcat(
"https://example.com/",
"path/:crab/resource",
HashMap::from([
("pretty", "cool/+/& yep".to_string()),
("really", "cool/+/& probably".to_string()),
("crab", "🦀".to_string()),
]);
);
assert_eq!(
url,
"https://example.com/path/🦀 well actually (%F0%9F%A6%80)/resource?pretty=cool%2F%2B%2F%26+yep&really=cool%2F%2B%2F%26+probably"
);
}