finchers 0.4.0

A combinator library for builidng HTTP services, based on Hyper and Futures
Documentation

finchers

Build Status crates.io docs-rs

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.

Features

  • ease of use
  • asynchronous handling based on Futures and Hyper 0.11
  • type-safe routing
  • focuse on stable channel

Example

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/.

Documentation

License

Dual licensed under the MIT and Apache 2.0.