@@ -1,6 +1,3 @@
1−{-# LANGUAGE TypeFamilies #-}
2−{-# LANGUAGE TypeOperators #-}
3−{-# LANGUAGE UndecidableInstances #-}
4module Servant.API (
1module Servant.API (
6 -- * Combinators
3 -- * Combinators
@@ -14,12 +11,20 @@ module Servant.API (
14 -- | Capturing parts of the url path as parsed values: @'Capture'@
11 -- | Capturing parts of the url path as parsed values: @'Capture'@
15 module Servant.API.Header,
12 module Servant.API.Header,
16 -- | Retrieving specific headers from the request
13 -- | Retrieving specific headers from the request
14+ module Servant.API.HttpVersion,
15+ -- | Retrieving the HTTP version of the request
17 module Servant.API.QueryParam,
16 module Servant.API.QueryParam,
18 -- | Retrieving parameters from the query string of the 'URI': @'QueryParam'@
17 -- | Retrieving parameters from the query string of the 'URI': @'QueryParam'@
19 module Servant.API.ReqBody,
18 module Servant.API.ReqBody,
20 -- | Accessing the request body as a JSON-encoded type: @'ReqBody'@
19 -- | Accessing the request body as a JSON-encoded type: @'ReqBody'@
21 module Servant.API.MatrixParam,
20 module Servant.API.MatrixParam,
22 -- | Retrieving matrix parameters from the 'URI' segment: @'MatrixParam'@
21 -- | Retrieving matrix parameters from the 'URI' segment: @'MatrixParam'@
22+ module Servant.API.RemoteHost,
23+ -- | Retrieving the IP of the client
24+ module Servant.API.IsSecure,
25+ -- | Is the request made through HTTPS?
26+ module Servant.API.Vault,
27+ -- | Access the location for arbitrary data to be shared by applications and middleware
24 -- * Actual endpoints, distinguished by HTTP method
29 -- * Actual endpoints, distinguished by HTTP method
25 module Servant.API.Get,
30 module Servant.API.Get,
@@ -64,6 +69,8 @@ import Servant.API.ContentTypes (Accept (..), FormUrlEncoded,
64import Servant.API.Delete (Delete)
69import Servant.API.Delete (Delete)
65import Servant.API.Get (Get)
70import Servant.API.Get (Get)
66import Servant.API.Header (Header (..))
71import Servant.API.Header (Header (..))
72+import Servant.API.HttpVersion (HttpVersion(..))
73+import Servant.API.IsSecure (IsSecure(..))
67import Servant.API.MatrixParam (MatrixFlag, MatrixParam,
74import Servant.API.MatrixParam (MatrixFlag, MatrixParam,
68 MatrixParams)
75 MatrixParams)
69import Servant.API.Patch (Patch)
76import Servant.API.Patch (Patch)
@@ -72,6 +79,7 @@ import Servant.API.Put (Put)
72import Servant.API.QueryParam (QueryFlag, QueryParam,
79import Servant.API.QueryParam (QueryFlag, QueryParam,
73 QueryParams)
80 QueryParams)
74import Servant.API.Raw (Raw)
81import Servant.API.Raw (Raw)
82+import Servant.API.RemoteHost (RemoteHost)
75import Servant.API.ReqBody (ReqBody)
83import Servant.API.ReqBody (ReqBody)
76import Servant.API.ResponseHeaders (AddHeader (addHeader),
84import Servant.API.ResponseHeaders (AddHeader (addHeader),
77 BuildHeadersTo (buildHeadersTo),
85 BuildHeadersTo (buildHeadersTo),
@@ -79,6 +87,7 @@ import Servant.API.ResponseHeaders (AddHeader (addHeader),
79 HList (..), Headers (..),
87 HList (..), Headers (..),
80 getHeadersHList, getResponse)
88 getHeadersHList, getResponse)
81import Servant.API.Sub ((:>))
89import Servant.API.Sub ((:>))
90+import Servant.API.Vault (Vault)
82import Servant.Common.Text (FromText (..), ToText (..))
91import Servant.Common.Text (FromText (..), ToText (..))
83import Servant.Utils.Links (HasLink (..), IsElem, IsElem',
92import Servant.Utils.Links (HasLink (..), IsElem, IsElem',
84 URI (..), safeLink)
93 URI (..), safeLink)