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::combinator::method::get; use finchers::combinator::path::{string, end};
fn main() { // create a factory of endpoints. let newendpoint = || { get( "hello".with(string).skip(end_) .map(|name| Json(format!("Hello, {}", name))) ) };
// start a HTTP server with above factory.
finchers::server::run_http(new_endpoint, "127.0.0.1:3000");
} ```
More examples are located in examples/
.
Dual licensed under the MIT and Apache 2.0.