servant/src/Servant/API.hs

61 lines
2.0 KiB
Haskell
Raw Normal View History

2014-10-28 10:12:25 +01:00
module Servant.API (
-- * Combinators
2014-10-28 12:36:32 +01:00
-- | Type-level combinator for expressing subrouting: @':>'@
2014-10-28 10:12:25 +01:00
module Servant.API.Sub,
2014-10-28 12:36:32 +01:00
-- | Type-level combinator for alternative endpoints: @':<|>'@
2014-10-30 11:37:58 +01:00
module Servant.API.Alternative,
2014-10-28 10:12:25 +01:00
-- * Accessing information from the request
2014-10-28 12:36:32 +01:00
-- | Capturing parts of the url path as parsed values: @'Capture'@
2014-10-28 10:12:25 +01:00
module Servant.API.Capture,
2014-12-08 12:28:11 +01:00
-- | Retrieving specific headers from the request
module Servant.API.Header,
2014-10-28 15:29:07 +01:00
-- | Retrieving parameters from the query string of the 'URI': @'QueryParam'@
module Servant.API.QueryParam,
2014-10-28 16:29:04 +01:00
-- | Accessing the request body as a JSON-encoded type: @'ReqBody'@
module Servant.API.ReqBody,
2014-12-28 22:56:58 +01:00
-- | Retrieving matrix parameters from the 'URI' segment: @'MatrixParam'@
module Servant.API.MatrixParam,
2014-10-28 10:12:25 +01:00
-- * Actual endpoints, distinguished by HTTP method
-- | GET requests
module Servant.API.Get,
-- | POST requests
module Servant.API.Post,
-- | DELETE requests
module Servant.API.Delete,
-- | PUT requests
module Servant.API.Put,
2015-02-10 01:06:42 +01:00
-- | PATCH requests
module Servant.API.Patch,
2015-01-08 16:24:19 +01:00
-- * Content Types
module Servant.API.ContentTypes,
2014-11-12 05:55:23 +01:00
-- * Untyped endpoints
2014-11-22 19:19:21 +01:00
-- | Plugging in a wai 'Network.Wai.Application', serving directories
2014-11-12 05:55:23 +01:00
module Servant.API.Raw,
-- * Utilities
-- | Type-safe internal URIs
module Servant.Utils.Links,
) where
2015-01-06 17:54:53 +01:00
import Servant.API.Alternative ( (:<|>)(..) )
import Servant.API.Capture ( Capture )
import Servant.API.ContentTypes ( JSON , PlainText, OctetStream
, MimeRender(..) , MimeUnrender(..))
2015-01-06 17:54:53 +01:00
import Servant.API.Delete ( Delete )
import Servant.API.Get ( Get )
import Servant.API.Header ( Header )
import Servant.API.Post ( Post )
import Servant.API.Put ( Put )
2015-02-10 01:06:42 +01:00
import Servant.API.Patch ( Patch )
2015-01-06 17:54:53 +01:00
import Servant.API.QueryParam ( QueryFlag, QueryParams, QueryParam )
2014-12-28 22:56:58 +01:00
import Servant.API.MatrixParam ( MatrixFlag, MatrixParams, MatrixParam )
2015-01-06 17:54:53 +01:00
import Servant.API.Raw ( Raw )
import Servant.API.ReqBody ( ReqBody )
import Servant.API.Sub ( (:>)(..) )
import Servant.Utils.Links ( safeLink, URI(..), IsElem, IsElem', HasLink(..) )