airship-0.1.0.0: A Webmachine-inspired HTTP library

Safe HaskellNone
LanguageHaskell2010

Airship.Helpers

Synopsis

Documentation

contentTypeMatches :: [MediaType] -> Handler s m Bool Source

Returns True if the request's Content-Type header is one of the provided media types. If the Content-Type header is not present, this function will return True.

fromWaiRequest :: Request -> Request IO Source

Construct an Airship Request from a WAI request.

resourceToWai :: RoutingSpec s IO () -> Resource s IO -> s -> Application Source

Given a RoutingSpec, a 404 resource, and a user state s, construct a WAI Application.