A Webmachine-inspired HTTP library based off ideas from the original Erlang project https://github.com/webmachine/webmachine A number of examples can be found in https://github.com/helium/airship/tree/master/example illustrating how to build airship based services.


Keywords
mit, web, Propose Tags , Airship, Airship.Config, Airship.Headers, Airship.Helpers, Airship.RST, Airship.Resource, Airship.Resource.Static, Airship.Route, Airship.Types, Webmachine, WAI, Warp, Resource record type, Webmachine decision tree, example/Basic.hs, blimp, haskell
License
MIT
Install
cabal install airship-0.9.2

Documentation

Airship

Join the chat at https://gitter.im/helium/airship

Build Status

Airship is a Haskell library for handling and serving HTTP requests in a RESTful fashion. It is heavily inspired by Webmachine and works with any WAI-compatible web server such as Warp. It aims to be small, fast, and flexible.

How does it work?

Airship resources are represented with a Resource record type. Each field in Resource corresponds to an action taken in the Webmachine decision tree. Airship provides a defaultResource with sensible defaults for each of these actions; you build web services by overriding fields in the default resource with your own.

Routes are declared with a simple monadic syntax:

routes = do
    root                        #> someRootResource
    "account" </> var "name"    #> accountResource

For a simple example that handles HTTP GET and POST requests, please check example/Basic.hs. For a slightly more involved example that generates HTML and manages a pool of resources, please check the blimp repository.

Airship is copyright © 2015 Helium Systems, Inc., and released to the public under the terms of the MIT license.