#query-string #url #percent-code

urlqstring

A URL query string for rust

10 releases

0.3.5 Mar 15, 2020
0.3.4 Feb 2, 2020
0.3.1 Jan 5, 2020
0.2.2 Dec 29, 2019
0.1.0 Nov 30, 2019

#49 in #query-string

Download history 85/week @ 2024-04-01 32/week @ 2024-04-08 19/week @ 2024-04-15 39/week @ 2024-04-22 25/week @ 2024-04-29 13/week @ 2024-05-06 18/week @ 2024-05-13 15/week @ 2024-05-20 38/week @ 2024-05-27 46/week @ 2024-06-03 29/week @ 2024-06-10 37/week @ 2024-06-17 31/week @ 2024-06-24 72/week @ 2024-07-01 10/week @ 2024-07-08 10/week @ 2024-07-15

128 downloads per month
Used in 3 crates

Custom license

20KB
393 lines

urlqstring

Introduce

urlqstring is a general library for url query string

This crate is a general purpose library for common function found when working with the request's query parameters. This library aims to implement the querystring function in Nodejs

Install Tutoria

Add the urlqstring crate dependency in your project's toml file, such as:

[dependencies]
urlqstring = "0.3.4"

Instructions

Please refer to the documentation for detauled instructions: urlqstring doc


lib.rs:

A general library for url query string

This crate is a general purpose library for common function found when working with the request's query parameters.

This library aims to implement the querystring function in Nodejs

Supported Types

For the library user, urlqstring will supports struct, map, and the string of query parameters style

Usage

See the examples as below.

use urlqstring::QueryParams;
fn main() {
    let enc1 = QueryParams::from(vec![
        ("params", ""),
        ("enc", "=-)(&#+~·@…%^$:*-_."),
    ]).stringify();
    let res1: String= String::from("params=%E5%BA%A6&enc=%3D-)(%26%23%2B~%C2%B7%40%E2%80%A6%25%5E%24%3A*-_.&");
    assert_eq!(enc1, res1);
}

No runtime deps