Function url_encode

Source
pub fn url_encode(value: &str) -> Bytes
Expand description

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.