httpbin 0.3.3

A httpbin reimplementation in rust. Works as a library and as a standalone webserver binary. (not affiliated to the original httpbin)
Documentation
1
2
3
4
5
6
7
8
9
use pages::{Response};
use service::{Request};


pub fn serve<S: 'static>(req: Request) -> Response<S> {
    req.json(json!({
        "origin": format!("{}", req.ip()),
    }))
}