Crates.io | url-builder |
lib.rs | url-builder |
version | 0.1.1 |
source | src |
created_at | 2022-12-19 21:54:19.330247 |
updated_at | 2023-02-28 21:47:18.023336 |
description | A simple URL Builder |
homepage | |
repository | https://github.com/evalir/url-builder-rs |
max_upload_size | |
id | 741707 |
size | 8,985 |
A simple URL builder with no dependencies, useful for a drop-in way to build URLs in a safe way no matter the protocol. See docs.rs.
use url_builder::URLBuilder;
let mut ub = URLBuilder::new();
ub.set_protocol("http")
.set_host("localhost")
.set_port(8000)
.add_param("first", "1")
.add_param("second", "2")
.add_param("third", "3");
println!("{}", ub.build());