servant-0.4.4.6: A family of combinators for defining webservices APIs

Safe HaskellNone
LanguageHaskell2010

Servant.API

Contents

Synopsis

Combinators

Type-level combinator for expressing subrouting: :>

Type-level combinator for alternative endpoints: :<|>

Accessing information from the request

Capturing parts of the url path as parsed values: Capture

Retrieving specific headers from the request

Retrieving parameters from the query string of the URI: QueryParam

Accessing the request body as a JSON-encoded type: ReqBody

Retrieving matrix parameters from the URI segment: MatrixParam

Actual endpoints, distinguished by HTTP method

GET requests

POST requests

DELETE requests

PUT requests

PATCH requests

Content Types

Serializing and deserializing types based on Accept and Content-Type headers.

Response Headers

Untyped endpoints

Plugging in a wai Application, serving directories

FromText and ToText

Classes and instances for types that can be converted to and from Text

Utilities

Type-safe internal URIs