just_serve_it 1.0.0

A lightweight and multithreaded backend web-framework for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde_json::Value;

#[derive(Clone)]
pub struct Body {
    pub json: Option<Value>,
    pub url_encoded: Option<Vec<(String, String)>>,
    pub raw: Option<String>,
}

impl Body {
    pub fn new(raw: String) -> Self {
        Self {
            json: None,
            url_encoded: None,
            raw: Some(raw),
        }
    }
}