Function decode
Source pub fn decode(encoded: &[u8]) -> Result<String, DecodeError>
Expand description
Decode URL encoded data.
§Arguments
encoded
The encoded data.
§Returns
String
The decoded string.
§Errors
§Examples
use http_box::util;
let string = match util::decode(b"fancy%20url%20encoded%20data") {
Ok(string) => string,
Err(_) => panic!()
};
assert_eq!(string, "fancy url encoded data");