Skip to content

v0.1.13

Choose a tag to compare

@zhuxiujia zhuxiujia released this 14 Feb 09:22
· 177 commits to main since this release

v0.1.13

  • add method read_json
    for example
use cogo_http::json::read_json;
use cogo_http::server::{Request, Response};

fn hello(mut req: Request, res: Response) {
    let json_data: serde_json::Value = read_json(&mut req).unwrap();
    println!("req:{:?}",json_data);
    res.send(json_data.to_string().as_bytes()).unwrap();
}