potato 0.3.12

A very simple and high performance http library.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub trait HttpCodeExt {
    fn http_code_to_desp(&self) -> &'static str;
}

impl HttpCodeExt for u16 {
    fn http_code_to_desp(&self) -> &'static str {
        http::StatusCode::from_u16(*self)
            .map(|c| c.canonical_reason())
            .ok()
            .flatten()
            .unwrap_or("UNKNOWN")
    }
}