Crate gostd_url

Source
Expand description

Package url parses URLs and implements query escaping.

Structs§

URL
Userinfo
Values

Functions§

Parse
Parse parses rawurl into a URL structure.
ParseQuery
ParseQuery parses the URL-encoded query string and returns a map listing the values specified for each key. ParseQuery always returns a non-nil map containing all the valid query parameters found; err describes the first decoding error encountered, if any.
PathEscape
PathEscape escapes the string so it can be safely placed inside a URL path segment, replacing special characters (including /) with %XX sequences as needed.
PathUnescape
PathUnescape does the inverse transformation of PathEscape, converting each 3-byte encoded substring of the form “%AB” into the hex-decoded byte 0xAB. It returns an error if any % is not followed by two hexadecimal digits.
QueryEscape
QueryEscape escapes the string so it can be safely placed inside a URL query.
QueryUnescape
QueryUnescape does the inverse transformation of QueryEscape, converting each 3-byte encoded substring of the form “%AB” into the hex-decoded byte 0xAB. It returns an error if any % is not followed by two hexadecimal digits.