[][src]Crate finchers

A combinator library for building asynchronous HTTP services.

The concept and design was highly inspired by finch.

Features

Example

use finchers::prelude::*;
use finchers::endpoint::syntax::path;

let get_post = path!(@get "/<u64>")
    .map(|id: u64| format!("GET: id={}", id));

let create_post = path!(@post "/")
    .and(endpoints::body::text())
    .map(|data: String| format!("POST: body={}", data));

let endpoint = path!("/posts")
    .and(get_post.or(create_post));

izanami::Server::bind_tcp(&"127.0.0.1:4000".parse()?)?
    .start(endpoint.into_service())

Modules

action

Definition of EndpointAction and related components.

endpoint

Components for constructing Endpoint.

endpoints

Built-in endpoints.

error

Error primitives.

output

Components for constructing HTTP responses.

prelude

A prelude for crates using the finchers crate.

service

The components for using the implementor of Endpoint as an HTTP Service.

test

The basic facilities for testing endpoints.

util

Macros

path

A macro for creating an endpoint that matches to the specific HTTP path.