Skip to main content

encode_segment

Function encode_segment 

Source
pub fn encode_segment(value: &str) -> String
Expand description

Percent-encodes one URL path segment (or query component).

Everything except RFC 3986 unreserved characters (A-Z a-z 0-9 - _ . ~) is encoded, so /, ?, # and spaces can never change the request path.