servant/servant/src/Servant/API.hs

86 lines
3.5 KiB
Haskell
Raw Normal View History

2015-05-03 01:05:37 +02:00
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
2014-10-28 10:12:25 +01:00
module Servant.API (
-- * Combinators
module Servant.API.Sub,
-- | Type-level combinator for expressing subrouting: @':>'@
2014-10-30 11:37:58 +01:00
module Servant.API.Alternative,
-- | Type-level combinator for alternative endpoints: @':<|>'@
2014-10-28 10:12:25 +01:00
-- * Accessing information from the request
module Servant.API.Capture,
-- | Capturing parts of the url path as parsed values: @'Capture'@
2014-12-08 12:28:11 +01:00
module Servant.API.Header,
-- | Retrieving specific headers from the request
module Servant.API.QueryParam,
-- | Retrieving parameters from the query string of the 'URI': @'QueryParam'@
2014-10-28 16:29:04 +01:00
module Servant.API.ReqBody,
-- | Accessing the request body as a JSON-encoded type: @'ReqBody'@
2014-12-28 22:56:58 +01:00
module Servant.API.MatrixParam,
-- | Retrieving matrix parameters from the 'URI' segment: @'MatrixParam'@
2014-10-28 10:12:25 +01:00
-- * Actual endpoints, distinguished by HTTP method
module Servant.API.Get,
-- | @GET@ requests
2014-10-28 10:12:25 +01:00
module Servant.API.Post,
-- | @POST@ requests
module Servant.API.Delete,
-- | @DELETE@ requests
module Servant.API.Put,
-- | @PUT@ requests
2015-02-10 01:06:42 +01:00
module Servant.API.Patch,
-- | @PATCH@ requests
2015-01-08 16:24:19 +01:00
-- * Content Types
module Servant.API.ContentTypes,
-- | Serializing and deserializing types based on @Accept@ and
-- @Content-Type@ headers.
2015-01-08 16:24:19 +01:00
2015-04-13 15:12:33 +02:00
-- * Response Headers
module Servant.API.ResponseHeaders,
2014-11-12 05:55:23 +01:00
-- * Untyped endpoints
module Servant.API.Raw,
-- | Plugging in a wai 'Network.Wai.Application', serving directories
-- * FromText and ToText
module Servant.Common.Text,
-- | Classes and instances for types that can be converted to and from @Text@
2014-11-12 05:55:23 +01:00
-- * Utilities
module Servant.Utils.Links,
-- | Type-safe internal URIs
) where
2015-04-13 15:12:33 +02:00
import Servant.API.Alternative ((:<|>) (..))
import Servant.API.Capture (Capture)
2015-05-03 01:05:37 +02:00
import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
2015-04-13 15:12:33 +02:00
FromFormUrlEncoded (..), JSON,
MimeRender (..),
MimeUnrender (..), OctetStream,
PlainText, ToFormUrlEncoded (..))
import Servant.API.Delete (Delete)
import Servant.API.Get (Get)
2015-05-03 01:05:37 +02:00
import Servant.API.Header (Header (..))
2015-04-13 15:12:33 +02:00
import Servant.API.MatrixParam (MatrixFlag, MatrixParam,
MatrixParams)
import Servant.API.Patch (Patch)
import Servant.API.Post (Post)
import Servant.API.Put (Put)
import Servant.API.QueryParam (QueryFlag, QueryParam,
QueryParams)
import Servant.API.Raw (Raw)
import Servant.API.ReqBody (ReqBody)
2015-05-03 01:05:37 +02:00
import Servant.API.ResponseHeaders (AddHeader (addHeader),
BuildHeadersTo (buildHeadersTo),
GetHeaders (getHeaders),
HList (..), Headers (..),
getHeadersHList, getResponse)
2015-04-13 15:12:33 +02:00
import Servant.API.Sub ((:>))
import Servant.Common.Text (FromText (..), ToText (..))
import Servant.Utils.Links (HasLink (..), IsElem, IsElem',
URI (..), safeLink)