2014-10-28 10:12:25 +01:00
|
|
|
module Servant.API (
|
|
|
|
|
|
|
|
-- * Combinators
|
|
|
|
module Servant.API.Sub,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Type-level combinator for expressing subrouting: @':>'@
|
2014-10-30 11:37:58 +01:00
|
|
|
module Servant.API.Alternative,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Type-level combinator for alternative endpoints: @':<|>'@
|
2017-05-16 10:19:37 +02:00
|
|
|
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,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Retrieving specific headers from the request
|
2015-06-23 10:34:20 +02:00
|
|
|
module Servant.API.HttpVersion,
|
|
|
|
-- | Retrieving the HTTP version of the request
|
2014-10-28 15:06:47 +01:00
|
|
|
module Servant.API.QueryParam,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Retrieving parameters from the query string of the 'URI': @'QueryParam'@
|
2014-10-28 16:29:04 +01:00
|
|
|
module Servant.API.ReqBody,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Accessing the request body as a JSON-encoded type: @'ReqBody'@
|
2015-06-23 10:34:20 +02:00
|
|
|
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
|
2015-11-27 02:05:34 +01:00
|
|
|
module Servant.API.Verbs,
|
2014-10-28 15:22:28 +01:00
|
|
|
|
2016-02-17 18:49:01 +01:00
|
|
|
-- * Authentication
|
|
|
|
module Servant.API.BasicAuth,
|
|
|
|
|
2015-01-08 16:24:19 +01:00
|
|
|
-- * Content Types
|
|
|
|
module Servant.API.ContentTypes,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | 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,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Plugging in a wai 'Network.Wai.Application', serving directories
|
|
|
|
|
2015-10-07 23:38:47 +02:00
|
|
|
-- * 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
|
|
|
|
2016-03-06 22:23:55 +01:00
|
|
|
|
|
|
|
-- * Experimental modules
|
|
|
|
module Servant.API.Experimental.Auth,
|
|
|
|
-- | General Authentication
|
|
|
|
|
2014-10-28 15:22:28 +01:00
|
|
|
-- * Utilities
|
2014-11-07 09:58:53 +01:00
|
|
|
module Servant.Utils.Links,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Type-safe internal URIs
|
2014-10-25 01:27:39 +02:00
|
|
|
) where
|
|
|
|
|
2015-04-13 15:12:33 +02:00
|
|
|
import Servant.API.Alternative ((:<|>) (..))
|
2016-02-17 18:49:01 +01:00
|
|
|
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,
|
2016-09-02 02:24:49 +02:00
|
|
|
JSON,
|
2016-01-07 14:30:08 +01:00
|
|
|
MimeRender (..), NoContent (NoContent),
|
2015-04-13 15:12:33 +02:00
|
|
|
MimeUnrender (..), OctetStream,
|
2016-09-02 02:24:49 +02:00
|
|
|
PlainText)
|
2017-05-16 10:19:37 +02:00
|
|
|
import Servant.API.Empty (EmptyAPI (..))
|
2016-03-06 22:23:55 +01:00
|
|
|
import Servant.API.Experimental.Auth (AuthProtect)
|
2015-05-03 01:05:37 +02:00
|
|
|
import Servant.API.Header (Header (..))
|
2015-08-17 23:56:29 +02:00
|
|
|
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)
|
2015-06-23 10:34:20 +02:00
|
|
|
import Servant.API.RemoteHost (RemoteHost)
|
2015-04-13 15:12:33 +02:00
|
|
|
import Servant.API.ReqBody (ReqBody)
|
2016-10-21 14:36:14 +02:00
|
|
|
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 ((:>))
|
2015-06-23 10:34:20 +02:00
|
|
|
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,
|
2016-01-07 14:30:08 +01:00
|
|
|
Patch,
|
2016-01-07 13:44:08 +01:00
|
|
|
PatchAccepted, PatchNoContent,
|
|
|
|
PatchNoContent,
|
|
|
|
PatchNonAuthoritative, Post,
|
|
|
|
PostAccepted, PostNoContent,
|
|
|
|
PostNonAuthoritative,
|
|
|
|
PostResetContent, Put,
|
|
|
|
PutAccepted, PutNoContent,
|
|
|
|
PutNoContent, PutNonAuthoritative,
|
2015-11-27 02:05:34 +01:00
|
|
|
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)
|
2015-11-27 02:05:34 +01:00
|
|
|
import Web.HttpApiData (FromHttpApiData (..),
|
|
|
|
ToHttpApiData (..))
|