.`/      !"#$%&'()*+,-. Safe-Inferred 0kSimple data type to represent the target of HTTP requests for servant's automatically-generated clients.URI scheme to usehost (eg "haskell.org") port (eg 80)URI scheme to usehttps://http://     NoneM!   param name param value!"#$%&'()*!  !"#$%&'()*&  !"#$%&'()*   !"#$%&'()*None()234=JKM+This class lets us define how each API combinator influences the creation of an HTTP request. It's mostly an internal class, you can just use ....@ allows you to produce operations to query an API from a client. \type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: EitherT String IO [Book] postNewBook :: Book -> EitherT String IO Book (getAllBooks :<|> postNewBook) = client myApi host where host = BaseUrl Http "localhost" 8080/"Make the querying function append path to the request path.0 If you use a 1 in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your 1g. That function will take care of encoding this argument as JSON and of using it as the request body.(All you need is for your type to have a ToJSON instance.Example: type MyApi = "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book myApi :: Proxy MyApi myApi = Proxy addBook :: Book -> EitherT String IO Book addBook = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "addBook" to query that endpoint2Pick a MethodK and specify where the server you want to query is. You get back the full 3.4 If you use a 5s in one of your endpoints in your API, the corresponding querying function will automatically take an additional 6 argument. If you give 7,, nothing will be added to the path segment.fOtherwise, this function will insert a value-less matrix parameter under the name associated to your 5.Example: {type MyApi = "books" :> MatrixFlag "published" :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooks :: Bool -> EitherT String IO [Book] getBooks = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooks" to query that endpoint. -- 'getBooksBy False' for all books -- 'getBooksBy True' to only get _already published_ books8 If you use a 9 in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument, a list of values of the type specified by your 9.EIf you give an empty list, nothing will be added to the query string.Otherwise, this function will take care of inserting a textual representation of your values in the path segment string, under the same matrix string parameter name.OYou can control how values for your type are turned into text by specifying a : instance for your type.Example: type MyApi = "books" :> MatrixParams "authors" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: [Text] -> EitherT String IO [Book] getBooksBy = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooksBy" to query that endpoint. -- 'getBooksBy []' for all books -- 'getBooksBy ["Isaac Asimov", "Robert A. Heinlein"]' -- to get all books by Asimov and Heinlein; If you use a < in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your <, enclosed in Maybe.?If you give Nothing, nothing will be added to the query string.If you give a non-=n value, this function will take care of inserting a textual representation of this value in the query string.OYou can control how values for your type are turned into text by specifying a : instance for your type.Example: type MyApi = "books" :> MatrixParam "author" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: Maybe Text -> EitherT String IO [Book] getBooksBy = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooksBy" to query that endpoint. -- 'getBooksBy Nothing' for all books -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac Asimov> If you use a ?s in one of your endpoints in your API, the corresponding querying function will automatically take an additional 6 argument. If you give 7,, nothing will be added to the query string.lOtherwise, this function will insert a value-less query string parameter under the name associated to your ?.Example: ztype MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooks :: Bool -> EitherT String IO [Book] getBooks = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooks" to query that endpoint. -- 'getBooksBy False' for all books -- 'getBooksBy True' to only get _already published_ books@ If you use a A in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument, a list of values of the type specified by your A.EIf you give an empty list, nothing will be added to the query string.Otherwise, this function will take care of inserting a textual representation of your values in the query string, under the same query string parameter name.OYou can control how values for your type are turned into text by specifying a : instance for your type.Example: type MyApi = "books" :> QueryParams "authors" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: [Text] -> EitherT String IO [Book] getBooksBy = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooksBy" to query that endpoint. -- 'getBooksBy []' for all books -- 'getBooksBy ["Isaac Asimov", "Robert A. Heinlein"]' -- to get all books by Asimov and HeinleinB If you use a C in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your C, enclosed in Maybe.?If you give Nothing, nothing will be added to the query string.If you give a non-=n value, this function will take care of inserting a textual representation of this value in the query string.OYou can control how values for your type are turned into text by specifying a : instance for your type.Example: type MyApi = "books" :> QueryParam "author" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: Maybe Text -> EitherT String IO [Book] getBooksBy = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBooksBy" to query that endpoint. -- 'getBooksBy Nothing' for all books -- 'getBooksBy (Just "Isaac Asimov")' to get all books by Isaac AsimovD`If you have a 'Patch xs (Headers ls x)' endpoint, the client expects the corresponding headers.EWIf you have a 'Patch xs ()' endpoint, the client expects a 204 No Content HTTP header.FIf you have a GW endpoint in your API, the client side querying function that is created when calling .a will just require an argument that specifies the scheme, host and port to send the request to.H^If you have a 'Put xs (Headers ls x)' endpoint, the client expects the corresponding headers.IUIf you have a 'Put xs ()' endpoint, the client expects a 204 No Content HTTP header.JIf you have a KW endpoint in your API, the client side querying function that is created when calling .a will just require an argument that specifies the scheme, host and port to send the request to.L_If you have a 'Post xs (Headers ls x)' endpoint, the client expects the corresponding headers.MVIf you have a 'Post xs ()' endpoint, the client expects a 204 No Content HTTP header.NIf you have a OW endpoint in your API, the client side querying function that is created when calling .a will just require an argument that specifies the scheme, host and port to send the request to.P If you use a Q in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your Q, wrapped in Maybe.WThat function will take care of encoding this argument as Text in the request headers.(All you need is for your type to have a : instance.Example: newtype Referer = Referer { referrer :: Text } deriving (Eq, Show, Generic, FromText, ToText) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get '[JSON] Referer myApi :: Proxy MyApi myApi = Proxy viewReferer :: Maybe Referer -> EitherT String IO Book viewReferer = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "viewRefer" to query that endpoint -- specifying Nothing or e.g Just "http://haskell.org/" as argumentsR^If you have a 'Get xs (Headers ls x)' endpoint, the client expects the corresponding headers.SUIf you have a 'Get xs ()' endpoint, the client expects a 204 No Content HTTP status.TIf you have a UW endpoint in your API, the client side querying function that is created when calling .a will just require an argument that specifies the scheme, host and port to send the request to.VaIf you have a 'Delete xs (Headers ls x)' endpoint, the client expects the corresponding headers.WXIf you have a 'Delete xs ()' endpoint, the client expects a 204 No Content HTTP header.XIf you have a YW endpoint in your API, the client side querying function that is created when calling .a will just require an argument that specifies the scheme, host and port to send the request to.Z If you use a [ in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your [|. That function will take care of inserting a textual representation of this value at the right place in the request path.OYou can control how values for this type are turned into text by specifying a : instance for your type.Example: type MyApi = "books" :> Capture "isbn" Text :> Get '[JSON] Book myApi :: Proxy MyApi myApi = Proxy getBook :: Text -> EitherT String IO Book getBook = client myApi host where host = BaseUrl Http "localhost" 8080 -- then you can just use "getBook" to query that endpoint\A client querying function for a ] b5 will actually hand you one function for querying a and another one for querying b", stitching them together with ]#, which really is just like a pair. \type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: EitherT String IO [Book] postNewBook :: Book -> EitherT String IO Book (getAllBooks :<|> postNewBook) = client myApi host where host = BaseUrl Http "localhost" 8080+,-./0248;>@BDEFHIJLMNPRSTVWXZ\ +,-..+,-+,-./0248;>@BDEFHIJLMNPRSTVWXZ\^       !"#$%&'()*+,-./0123456789:3;<=>?=>@A3;B3CDE3;FGHIJ3KLM3KNO3KPQRS3TUVWX3YZ[\]3^_`3abcde3fghij3klm3nop3qrsservant-client-0.4.3Servant.Common.BaseUrlServant.Common.ReqServant.ClientBaseUrl baseUrlScheme baseUrlHost baseUrlPortSchemeHttpsHttp showBaseUrl parseBaseUrlReqreqPathqsreqBody reqAcceptheaders ServantErrorInvalidContentTypeHeaderresponseContentTypeHeaderConnectionErrorconnectionErrorUnsupportedContentType DecodeFailure decodeErrorFailureResponseresponseStatusresponseContentType responseBodydefReq appendToPathappendToMatrixParamsappendToQueryString addHeader setRQBody reqToRequest __manager__withGlobalManagerdisplayHttpRequestperformRequestperformRequestCTperformRequestNoBodycatchHttpException HasClientClientclientWithRouteclient $fHasClient:>$fHasClient:>0 servant-0.4.3Servant.API.ReqBodyReqBody$fHasClientRawhttp-client-0.4.15Network.HTTP.Client.TypesResponse$fHasClient:>1Servant.API.MatrixParam MatrixFlagghc-prim GHC.TypesBoolFalse$fHasClient:>2 MatrixParamsServant.Common.TextToText$fHasClient:>3 MatrixParambase Data.MaybeNothing$fHasClient:>4Servant.API.QueryParam QueryFlag$fHasClient:>5 QueryParams$fHasClient:>6 QueryParam$fHasClientPatch$fHasClientPatch0$fHasClientPatch1Servant.API.PatchPatch$fHasClientPut$fHasClientPut0$fHasClientPut1Servant.API.PutPut$fHasClientPost$fHasClientPost0$fHasClientPost1Servant.API.PostPost$fHasClient:>7Servant.API.HeaderHeader$fHasClientGet$fHasClientGet0$fHasClientGet1Servant.API.GetGet$fHasClientDelete$fHasClientDelete0$fHasClientDelete1Servant.API.DeleteDelete$fHasClient:>8Servant.API.CaptureCapture$fHasClient:<|>Servant.API.Alternative:<|>