#query-string #url #url-parameters #query-parameters #query #string-parser #params

url-search-params

url-search-params provides the ability to create search params from HashMap and vice versa

6 releases (major breaking)

12.0.0 May 11, 2023
11.0.0 May 11, 2023
10.0.0 Mar 23, 2023
9.0.0 Dec 25, 2022
1.0.0 Sep 4, 2022

#553 in HTTP server

Download history 96/week @ 2024-07-20 110/week @ 2024-07-27 193/week @ 2024-08-03 198/week @ 2024-08-10 210/week @ 2024-08-17 105/week @ 2024-08-24 311/week @ 2024-08-31 179/week @ 2024-09-07 153/week @ 2024-09-14 117/week @ 2024-09-21 57/week @ 2024-09-28 112/week @ 2024-10-05 61/week @ 2024-10-12 75/week @ 2024-10-19 97/week @ 2024-10-26 329/week @ 2024-11-02

571 downloads per month
Used in 4 crates (3 directly)

MIT OR Apache-2…

17KB
228 lines

Welcome to url-search-params!

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.

Features

  1. Convert given string into a HashMap containing query string parameters as key-value pairs
  2. Convert given HashMap into a query string

Configuration

No additional configuration required.

Demo

Tests are available in the repository.

Documentation

Public functions definitions and usage can be found at git repository.

Build

If you want to build url-search-params on your own, make sure you have Rust installed.

$ cargo build

Test

If you want to test url-search-params.

$ cargo test

Community

Contact me on Discord where you can ask questions and share ideas. Follow the Rust code of conduct.

Donations

If you appreciate my work and want to support it, feel free to do it via PayPal.

No runtime deps