kvarn::prelude::utils::parse

Function uri

source
pub fn uri(path: &str) -> Option<&str>
Expand description

Will convert an str path component of a Uri to a Path. It asserts the first byte is a / and then chops it off.

Note: you must check that the path is safe to read from before using it. See sanitize_request.

Will return None if path.is_empty() or if the first byte isn’t a /.