#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

#46 in #query-string

Download history 51/week @ 2023-12-13 26/week @ 2023-12-20 18/week @ 2023-12-27 12/week @ 2024-01-03 5/week @ 2024-01-10 2/week @ 2024-01-17 4/week @ 2024-01-24 5/week @ 2024-01-31 9/week @ 2024-02-07 36/week @ 2024-02-14 43/week @ 2024-02-21 104/week @ 2024-02-28 52/week @ 2024-03-06 50/week @ 2024-03-13 32/week @ 2024-03-20 44/week @ 2024-03-27

182 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