roadrunner_uri (roadrunner v0.1.0)
View SourceURI percent-encoding helpers (RFC 3986 §2.1).
Pure binary in / binary out. Used by roadrunner_qs and the eventual router.
Summary
Functions
Decode a percent-encoded binary.
Replaces every %HH triple with the byte it encodes. Hex digits are
case-insensitive. Returns {error, badarg} if % is not followed by
exactly two hex digits — including a lone % at end of input.
Percent-encode a binary per RFC 3986.
Bytes in the unreserved set (ALPHA / DIGIT / - / . / _ / ~) pass
through unchanged; every other byte is replaced by %HH with uppercase
hex digits (per RFC 3986 §2.1 normalization recommendation).