What to encode: everything the fragment = *( pchar / "/" / "?" ) production disallows, except
# and %, which are left alone so that a whole URI reference and its existing escapes survive.
Percent-encodes everything but ASCII alphanumerics, for a value placed in one URL path
segment or query parameter. Same encoding as url_encode, as a String.
URL-encodes a string value for use in HTTP headers or other contexts requiring ASCII-compatibility.
Percent-encodes all non-alphanumeric characters (including spaces, punctuation, ASCII special
characters, non-ASCII characters, and control characters) to preserve the original information
while making the value ASCII-safe for use in HTTP headers or other contexts requiring ASCII-compatibility.