Skip to main content

percent_encode_component

Function percent_encode_component 

Source
pub fn percent_encode_component(input: &str) -> String
Expand description

RFC 3986 percent-encoding for one URL path segment or query value. Unreserved bytes (A-Z a-z 0-9 - . _ ~) are kept, a space becomes %20 (never +), and every other byte becomes %XX. Use percent_encode only for application/x-www-form-urlencoded bodies.