servant/servant/src/Servant/API.hs

111 lines
5.2 KiB
Haskell
Raw Normal View History

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: @':<|>'@
module Servant.API.Empty,
-- | Type-level combinator for an empty API: @'EmptyAPI'@
2014-10-28 10:12:25 +01:00
-- * Accessing information from the request
module Servant.API.Capture,
2016-05-26 17:49:04 +02:00
-- | Capturing parts of the url path as parsed values: @'Capture'@ and @'CaptureAll'@
2014-12-08 12:28:11 +01:00
module Servant.API.Header,
-- | Retrieving specific headers from the request
module Servant.API.HttpVersion,
-- | Retrieving the HTTP version of 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'@
module Servant.API.RemoteHost,
-- | Retrieving the IP of the client
module Servant.API.IsSecure,
-- | Is the request made through HTTPS?
module Servant.API.Vault,
-- | Access the location for arbitrary data to be shared by applications and middleware
2016-02-28 23:23:32 +01:00
module Servant.API.WithNamedContext,
-- | Access context entries in combinators in servant-server
2014-10-28 10:12:25 +01:00
-- * Actual endpoints, distinguished by HTTP method
module Servant.API.Verbs,
-- * Authentication
module Servant.API.BasicAuth,
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
-- * FromHttpApiData and ToHttpApiData
module Web.HttpApiData,
-- | Classes and instances for types that can be converted to and from HTTP API data.
2014-11-12 05:55:23 +01:00
-- * Experimental modules
module Servant.API.Experimental.Auth,
-- | General Authentication
-- * 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.BasicAuth (BasicAuth,BasicAuthData(..))
2016-05-26 17:49:04 +02:00
import Servant.API.Capture (Capture, CaptureAll)
2015-05-03 01:05:37 +02:00
import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
JSON,
MimeRender (..), NoContent (NoContent),
2015-04-13 15:12:33 +02:00
MimeUnrender (..), OctetStream,
PlainText)
import Servant.API.Empty (EmptyAPI (..))
import Servant.API.Experimental.Auth (AuthProtect)
2015-05-03 01:05:37 +02:00
import Servant.API.Header (Header (..))
import Servant.API.HttpVersion (HttpVersion (..))
import Servant.API.IsSecure (IsSecure (..))
2015-04-13 15:12:33 +02:00
import Servant.API.QueryParam (QueryFlag, QueryParam,
QueryParams)
import Servant.API.Raw (Raw)
import Servant.API.RemoteHost (RemoteHost)
2015-04-13 15:12:33 +02:00
import Servant.API.ReqBody (ReqBody)
import Servant.API.ResponseHeaders (AddHeader, addHeader, noHeader,
2015-05-03 01:05:37 +02:00
BuildHeadersTo (buildHeadersTo),
GetHeaders (getHeaders),
HList (..), Headers (..),
getHeadersHList, getResponse)
2015-04-13 15:12:33 +02:00
import Servant.API.Sub ((:>))
import Servant.API.Vault (Vault)
2016-01-08 17:43:10 +01:00
import Servant.API.Verbs (PostCreated, Delete, DeleteAccepted,
2016-01-07 13:44:08 +01:00
DeleteNoContent,
DeleteNonAuthoritative, Get,
GetAccepted, GetNoContent,
GetNonAuthoritative,
GetPartialContent,
GetResetContent,
Patch,
2016-01-07 13:44:08 +01:00
PatchAccepted, PatchNoContent,
PatchNoContent,
PatchNonAuthoritative, Post,
PostAccepted, PostNoContent,
PostNonAuthoritative,
PostResetContent, Put,
PutAccepted, PutNoContent,
PutNoContent, PutNonAuthoritative,
ReflectMethod (reflectMethod),
2016-01-08 17:43:10 +01:00
Verb, StdMethod(..))
2016-02-28 23:23:32 +01:00
import Servant.API.WithNamedContext (WithNamedContext)
2017-01-16 09:46:28 +01:00
import Servant.Utils.Links (HasLink (..), Link, IsElem, IsElem',
2015-04-13 15:12:33 +02:00
URI (..), safeLink)
import Web.HttpApiData (FromHttpApiData (..),
ToHttpApiData (..))