rocket-webhook 0.1.0-alpha.2

Webhook validation for Rocket applications
Documentation
1
2
3
4
5
6
7
8
//! Internal utilities

/// Try reading the body size from the content length header
pub fn body_size(headers: &rocket::http::HeaderMap) -> Option<usize> {
    headers
        .get_one("Content-Length")
        .and_then(|len| len.parse().ok())
}