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'@
|
2017-12-10 13:25:14 +01:00
|
|
|
module Servant.API.Modifiers,
|
|
|
|
-- | Type-level modifiers for 'QueryParam', 'Header' and 'ReqBody'.
|
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
|
|
|
|
2017-10-19 00:43:43 +02:00
|
|
|
-- * Streaming endpoints, distinguished by HTTP method
|
|
|
|
module Servant.API.Stream,
|
|
|
|
|
2017-10-19 23:43:01 +02:00
|
|
|
-- * Authentication
|
2016-02-17 18:49:01 +01:00
|
|
|
module Servant.API.BasicAuth,
|
|
|
|
|
2017-06-08 16:35:24 +02:00
|
|
|
-- * Endpoints description
|
|
|
|
module Servant.API.Description,
|
|
|
|
|
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
|
|
|
|
|
2018-06-25 00:36:20 +02:00
|
|
|
-- * Links
|
|
|
|
module Servant.Links,
|
2015-02-24 10:28:23 +01:00
|
|
|
-- | Type-safe internal URIs
|
2018-03-11 16:58:31 +01:00
|
|
|
|
2017-12-10 13:25:14 +01:00
|
|
|
-- * Re-exports
|
|
|
|
If,
|
|
|
|
SBool (..), SBoolI (..)
|
2014-10-25 01:27:39 +02:00
|
|
|
) where
|
|
|
|
|
2018-03-11 16:58:31 +01:00
|
|
|
import Data.Singletons.Bool
|
|
|
|
(SBool (..), SBoolI (..))
|
|
|
|
import Data.Type.Bool
|
|
|
|
(If)
|
|
|
|
import Servant.API.Alternative
|
|
|
|
((:<|>) (..))
|
|
|
|
import Servant.API.BasicAuth
|
|
|
|
(BasicAuth, BasicAuthData (..))
|
|
|
|
import Servant.API.Capture
|
|
|
|
(Capture, Capture', CaptureAll)
|
|
|
|
import Servant.API.ContentTypes
|
|
|
|
(Accept (..), FormUrlEncoded, JSON, MimeRender (..),
|
|
|
|
MimeUnrender (..), NoContent (NoContent), OctetStream,
|
|
|
|
PlainText)
|
|
|
|
import Servant.API.Description
|
|
|
|
(Description, Summary)
|
|
|
|
import Servant.API.Empty
|
|
|
|
(EmptyAPI (..))
|
|
|
|
import Servant.API.Experimental.Auth
|
|
|
|
(AuthProtect)
|
|
|
|
import Servant.API.Header
|
|
|
|
(Header, Header')
|
|
|
|
import Servant.API.HttpVersion
|
|
|
|
(HttpVersion (..))
|
|
|
|
import Servant.API.IsSecure
|
|
|
|
(IsSecure (..))
|
|
|
|
import Servant.API.Modifiers
|
|
|
|
(Lenient, Optional, Required, Strict)
|
|
|
|
import Servant.API.QueryParam
|
|
|
|
(QueryFlag, QueryParam, QueryParam', QueryParams)
|
|
|
|
import Servant.API.Raw
|
|
|
|
(Raw)
|
|
|
|
import Servant.API.RemoteHost
|
|
|
|
(RemoteHost)
|
|
|
|
import Servant.API.ReqBody
|
|
|
|
(ReqBody, ReqBody')
|
|
|
|
import Servant.API.ResponseHeaders
|
|
|
|
(AddHeader, BuildHeadersTo (buildHeadersTo),
|
|
|
|
GetHeaders (getHeaders), HList (..), Headers (..),
|
|
|
|
ResponseHeader (..), addHeader, getHeadersHList, getResponse,
|
|
|
|
noHeader)
|
|
|
|
import Servant.API.Stream
|
2018-06-29 21:08:26 +02:00
|
|
|
(BoundaryStrategy (..), ByteStringParser (..),
|
|
|
|
FramingRender (..), FramingUnrender (..),
|
|
|
|
FromResultStream (..), NetstringFraming, NewlineFraming,
|
2018-05-23 11:28:12 +02:00
|
|
|
NoFraming, ResultStream (..), Stream, StreamGenerator (..),
|
|
|
|
StreamGet, StreamPost, ToStreamGenerator (..))
|
2018-03-11 16:58:31 +01:00
|
|
|
import Servant.API.Sub
|
|
|
|
((:>))
|
|
|
|
import Servant.API.Vault
|
|
|
|
(Vault)
|
|
|
|
import Servant.API.Verbs
|
|
|
|
(Delete, DeleteAccepted, DeleteNoContent,
|
|
|
|
DeleteNonAuthoritative, Get, GetAccepted, GetNoContent,
|
|
|
|
GetNonAuthoritative, GetPartialContent, GetResetContent,
|
2018-08-13 15:26:34 +02:00
|
|
|
Patch, PatchAccepted, PatchNoContent, PatchNonAuthoritative,
|
2018-03-11 16:58:31 +01:00
|
|
|
Post, PostAccepted, PostCreated, PostNoContent,
|
|
|
|
PostNonAuthoritative, PostResetContent, Put, PutAccepted,
|
2018-08-13 15:15:45 +02:00
|
|
|
PutCreated, PutNoContent, PutNonAuthoritative,
|
2018-03-11 16:58:31 +01:00
|
|
|
ReflectMethod (reflectMethod), StdMethod (..), Verb)
|
|
|
|
import Servant.API.WithNamedContext
|
|
|
|
(WithNamedContext)
|
2018-06-25 00:36:20 +02:00
|
|
|
import Servant.Links
|
2018-03-11 16:58:31 +01:00
|
|
|
(HasLink (..), IsElem, IsElem', Link, URI (..), safeLink)
|
|
|
|
import Web.HttpApiData
|
|
|
|
(FromHttpApiData (..), ToHttpApiData (..))
|