finchers
finchers
is a combinator library for building HTTP services, based on hyper
and futures
.
The concept and design of this library is highly inspired by finch
and combine
.
```rust extern crate finchers;
use finchers::{Endpoint, Json}; use finchers::endpoint::{string_}; use finchers::endpoint::method::get;
fn main() { // create an endpoint let endpoint = get("hello".with(string_)).map(|name| { Json(format!("Hello, {}", name)) });
// start a HTTP server.
finchers::server::run_http(endpoint, "127.0.0.1:3000");
} ```
More examples are located in examples/
.
Dual licensed under the MIT and Apache 2.0.