Crates.io | url-search-params |
lib.rs | url-search-params |
version | 12.0.0 |
source | src |
created_at | 2022-09-04 14:16:12.88171 |
updated_at | 2023-05-11 10:44:22.851509 |
description | url-search-params provides the ability to create search params from HashMap and vice versa. |
homepage | https://github.com/bohdaq/url-search-params |
repository | https://github.com/bohdaq/url-search-params |
max_upload_size | |
id | 658307 |
size | 56,318 |
url-search-params
provides the ability to create search params from HashMap and vice versa.
In URL (web address) search params correspond to query string.
Keep in mind it works with the query string part of the URL, it is not intended to work on the whole URL by design.
As per specification, the question mark ?
URL delimiter is not part of a query string.
Also hash mark #
url delimiter and fragment part of URL is not the parts of a query string.
In practice, it means, the fragment and preceding hash mark won't be sent in a request to a server.
Convert given string into a HashMap containing query string parameters as key-value pairs
Convert given HashMap into a query string
No additional configuration required.
Tests are available in the repository.
Public functions definitions and usage can be found at git repository.
If you want to build url-search-params
on your own, make sure you have Rust installed.
$ cargo build
If you want to test url-search-params
.
$ cargo test
Contact me on Discord where you can ask questions and share ideas. Follow the Rust code of conduct.
If you appreciate my work and want to support it, feel free to do it via PayPal.