yOt&W      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVSafe$05kSimple 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) path (eg "ab/c")URI scheme to usehttp:// https://W   W None0T" !"#$%&'()*+, param name param value-./01234567  !"#$&'%()*+,-./012345' !"#$%&'%&%&(&)76*+,-./012345 !"#$%&'%&%&(&)*+,-./01234567None9DR9hFor better type inference and to avoid usage of a data family, we newtype wrap the combination of some <8 and a function to add authentication data to a request4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE<For a resource protected by authentication (e.g. AuthProtect), we need to provide the client with some data used to add authentication data to a request4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE=>Handy helper to avoid wrapping datatypes in tuples everywhere.4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE9:;<=9:;<=9:;<=9:;<=None9DR>1Authenticate a request using Basic Authentication>>>>None+,-9:;DQRT ?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 B.BB@ allows you to produce operations to query an API from a client. Jtype MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: Manager -> BaseUrl -> ClientM [Book] postNewBook :: Book -> Manager -> BaseUrl -> ClientM Book (getAllBooks :<|> postNewBook) = client myApiI"Make the querying function append path to the request path.J If you use a X in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your Xg. 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 -> Manager -> BaseUrl -> ClientM Book addBook = client myApi -- then you can just use "addBook" to query that endpointKPick a MethodK and specify where the server you want to query is. You get back the full Y.L If you use a Zs in one of your endpoints in your API, the corresponding querying function will automatically take an additional [ argument. If you give \,, 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 Z.Example: Ttype MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooks :: Bool -> Manager -> BaseUrl -> ClientM [Book] getBooks = client myApi -- then you can just use "getBooks" to query that endpoint. -- 'getBooksBy False' for all books -- 'getBooksBy True' to only get _already published_ booksM If you use 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 ].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] -> Manager -> BaseUrl -> ClientM [Book] getBooksBy = client myApi -- 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 HeinleinN 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: qtype MyApi = "books" :> QueryParam "author" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: Maybe Text -> Manager -> BaseUrl -> ClientM [Book] getBooksBy = client myApi -- 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 AsimovOUsing a a= combinator in your API doesn't affect the client functions.P If you use a b in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your b, 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, ToHttpApiData) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get '[JSON] Referer myApi :: Proxy MyApi myApi = Proxy viewReferer :: Maybe Referer -> Manager -> BaseUrl -> ClientM Book viewReferer = client myApi -- then you can just use "viewRefer" to query that endpoint -- specifying Nothing or e.g Just "http://haskell.org/" as argumentsU 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|. 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 -> Manager -> BaseUrl -> ClientM Book getBook = client myApi -- then you can just use "getBook" to query that endpointVA client querying function for a d b5 will actually hand you one function for querying a and another one for querying b", stitching them together with d#, which really is just like a pair. Btype MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: Manager -> BaseUrl -> ClientM [Book] postNewBook :: Book -> Manager -> BaseUrl -> ClientM Book (getAllBooks :<|> postNewBook) = client myApi?@ABCDEFGHIJKLMNOPQRSTUV"  !"#$&'%()9:;<=?@AB<9:;B?@A= !"#$%&'%&%&(&)?@ABCDEFGHIJKLMNOPQRSTUVe      !"#$%&'()*+,-./0123456789:;<==>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_Z`abcdbceZ`fghiZ`jklmnopZqrZstZuvw)servant-client-0.8-2dzNtieEIVO6vgEQ2GEZI1Servant.Common.BaseUrlServant.Common.Req Servant.Client.Experimental.AuthServant.Common.BasicAuthServant.ClientInvalidBaseUrlExceptionBaseUrl baseUrlScheme baseUrlHost baseUrlPort baseUrlPathSchemeHttpHttps showBaseUrl parseBaseUrl"$fExceptionInvalidBaseUrlException $fEqBaseUrl $fShowScheme $fEqScheme $fOrdScheme$fGenericScheme $fShowBaseUrl $fOrdBaseUrl$fGenericBaseUrl$fShowInvalidBaseUrlExceptionClientMReqreqPathqsreqBody reqAcceptheaders ServantErrorFailureResponse DecodeFailureUnsupportedContentTypeInvalidContentTypeHeaderConnectionErrorresponseStatusresponseContentType responseBody decodeErrorresponseContentTypeHeaderconnectionErrordefReq appendToPathappendToQueryString addHeader setRQBody reqToRequestdisplayHttpRequestperformRequestdisableStatusCheckperformRequestCTperformRequestNoBodycatchConnectionError$fExceptionServantError$fEqServantError$fShowServantErrorAuthenticateReq unAuthReqAuthClientDatamkAuthenticateReq basicAuthReq HasClientClientclientWithRouteclient$fHasClientTYPE:>$fHasClientTYPE:>0$fHasClientTYPEWithNamedContext$fHasClientTYPE:>1$fHasClientTYPE:>2$fHasClientTYPE:>3$fHasClientTYPE:>4$fHasClientTYPE:>5$fHasClientTYPERaw$fHasClientTYPE:>6$fHasClientTYPE:>7$fHasClientTYPE:>8$fHasClientTYPE:>9$fHasClientTYPE:>10$fHasClientTYPEVerb$fHasClientTYPEVerb0$fHasClientTYPEVerb1$fHasClientTYPEVerb2$fHasClientTYPE:>11$fHasClientTYPE:<|>"servant-0.8-34HJhZacwQ6EyKLmgT2NFEServant.API.ReqBodyReqBody(http-client-0.5.1-H2Iq3GkfK1sDSWv9SyD3QZNetwork.HTTP.Client.TypesResponseServant.API.QueryParam QueryFlagghc-prim GHC.TypesBoolFalse QueryParams*http-api-data-0.2.3-5nT2z3OVR1s5RCKeXpTOYYWeb.HttpApiData.Internal ToHttpApiData QueryParambaseGHC.BaseNothing'http-types-0.9.1-513M7pGnrTGFw8O1wLzDf0Network.HTTP.Types.Version HttpVersionServant.API.HeaderHeaderServant.API.CaptureCaptureServant.API.Alternative:<|>