Skip to main content

Module urlencoding

Module urlencoding 

Source
Expand description

URL percent-encoding and decoding per RFC 3986.

The unreserved set is ALPHA / DIGIT / "-" / "." / "_" / "~"; every other byte is percent-encoded as %HH using uppercase hexadecimal as recommended by RFC 3986 Section 2.1.

Decoding accepts both uppercase and lowercase hex. A % that is not followed by two hex digits is passed through literally, matching the behaviour of the urlencoding crate that this module replaces.

Enums§

DecodeError
Errors from URL percent-decoding.

Functions§

decode
Percent-decodes a string per RFC 3986.
decode_bytes
Percent-decodes a byte slice.
encode
Percent-encodes a string per RFC 3986.
encode_bytes
Percent-encodes a byte slice per RFC 3986.