rkt 0.6.0

Web framework with a focus on usability, security, extensibility, and speed. (Community Fork)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[macro_use]
extern crate rkt;

#[get("/")]
fn index() -> String {
    "Hello, world!".into()
}

#[test]
fn content_length_header() {
    let rocket = rkt::build().mount("/", routes![index]);
    let client = rkt::local::blocking::Client::debug(rocket).unwrap();
    let response = client.get("/").dispatch();
    assert!(response.headers().get_one("Content-Length").is_some());
}