airship: A Webmachine-inspired HTTP library

[ library, mit, web ] [ Propose Tags ] [ Report a vulnerability ]

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/tmcgilchrist/airship/tree/master/example illustrating how to build airship based services.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.4.1.0, 0.4.2.0, 0.4.3.0, 0.5.0, 0.6.0, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5
Change log Changes.md
Dependencies attoparsec, base (>=4.7 && <5), base64-bytestring (>=1.0 && <1.3), blaze-builder (>=0.3 && <0.5), bytestring, bytestring-trie (>=0.2.4 && <0.3), case-insensitive, containers, cryptohash (>=0.11 && <0.12), directory, either (>=4.3 && <6.0), filepath (>=1.3 && <1.5), http-date, http-media, http-types (>=0.8 && <0.13), lifted-base (>=0.2 && <0.3), microlens, mime-types (>=0.1.0 && <0.1.1), mmorph (>=1.0 && <1.3), monad-control (>=1.0), mtl, network, old-locale, random, semigroups (>=0.18 && <0.21), text, time, transformers, transformers-base, unix (>=2.7 && <2.8), unordered-containers, wai (>=3.0.3.0 && <3.3), wai-extra (>=3.0 && <3.2) [details]
Tested with ghc ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.2.2
License MIT
Author Reid Draper and Patrick Thomson
Maintainer Tim McGilchrist <timmcgil@gmail.com>
Category Web
Home page https://github.com/tmcgilchrist/airship/
Bug tracker https://github.com/tmcgilchrist/airship/issues
Source repo head: git clone https://github.com/tmcgilchrist/airship.git
Uploaded by lambda_foo at 2022-04-11T04:26:08Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 13122 total (41 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-04-11 [all 1 reports]

Readme for airship-0.9.5

[back to package description]

Airship

GitHub CI docs

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.