urlcat 0.2.1

a simple tool to help easily generate dynamic urls with proper encoding
Documentation

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"
    );
}