Crate urlqstring

Source
Expand description

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);
}

Macros§

proto_object
Construct a QueryParams from a Js object-like literal.

Structs§

QueryParams