úÎÈM¿Ù      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹Œ Safe%16 kSimple 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 use http:// https://      None-7;<=>?FST7ÝgMatch client structure with client functions, expanding left-nested API clients in the same structure.mMatch client structure with client functions, regarding left-nested API clients as separate data structures.TThis class allows us to match client structure with client functions produced with client# without explicit pattern-matching.The client structure needs a  instance.Example: ÿˆtype API = "foo" :> Capture "x" Int :> Get '[JSON] Int :<|> "bar" :> QueryParam "a" Char :> QueryParam "b" String :> Post '[JSON] [Int] :<|> Capture "nested" Int :> NestedAPI type NestedAPI = Get '[JSON] String :<|> "baz" :> QueryParam "c" Char :> Post '[JSON] () data APIClient = APIClient { getFoo :: Int -> ClientM Int , postBar :: Maybe Char -> Maybe String -> ClientM [Int] , mkNestedClient :: Int -> NestedClient } deriving GHC.Generic instance Generics.SOP.Generic APIClient instance (Client API ~ client) => ClientLike client APIClient data NestedClient = NestedClient { getString :: ClientM String , postBaz :: Maybe Char -> ClientM () } deriving GHC.Generic instance Generics.SOP.Generic NestedClient instance (Client NestedAPI ~ client) => ClientLike client NestedClient mkAPIClient :: APIClient mkAPIClient = mkClient (client (Proxy :: Proxy API))2By default, left-nested alternatives are expanded: ÿ2type API1 = "foo" :> Capture "x" Int :> Get '[JSON] Int :<|> "bar" :> QueryParam "a" Char :> Post '[JSON] String type API2 = "baz" :> QueryParam "c" Char :> Post '[JSON] () type API = API1 :<|> API2 data APIClient = APIClient { getFoo :: Int -> ClientM Int , postBar :: Maybe Char -> ClientM String , postBaz :: Maybe Char -> ClientM () } deriving GHC.Generic instance Generics.SOP.Generic APIClient instance (Client API ~ client) => ClientLike client APIClient mkAPIClient :: APIClient mkAPIClient = mkClient (client (Proxy :: Proxy API))!If you want to define client for API1, as a separate data structure, you can use !: ÿHdata APIClient1 = APIClient1 { getFoo :: Int -> ClientM Int , postBar :: Maybe Char -> ClientM String } deriving GHC.Generic instance Generics.SOP.Generic APIClient1 instance (Client API1 ~ client) => ClientLike client APIClient1 data APIClient = APIClient { mkAPIClient1 :: APIClient1 , postBaz :: Maybe Char -> ClientM () } deriving GHC.Generic instance Generics.SOP.Generic APIClient instance (Client API ~ client) => ClientLike client APIClient where mkClient = genericMkClientP mkAPIClient :: APIClient mkAPIClient = mkClient (client (Proxy :: Proxy API)) XGenerate client structure from client type, expanding left-nested API (done by default).!jGenerate client structure from client type, regarding left-nested API clients as separate data structures.  !('&"%$# !None13456>?FQTVC 3@The request body. Currently only lazy ByteStrings are supported.?0A type representing possible errors in a request2Note that this type substantially changed in 0.12.@%The server returned an error responseA2The body could not be decoded at the expected typeB1The content-type of the response is not supportedC"The content-type header is invalidD:There was a connection error, and no response was receivedI 9Set body and media type of the request being constructed.2The body is set to the given bytestring using the 4 constructor.J 9Set body and media type of the request being constructed.G param name param value")*+,-.210/34567>=<;:98?DCBA@EFGHIJ#?@ABCDK6789:;<=>534-./012,)*+EFGHIJ)*+-./012346789:;<=>?@ABCDNone;FTE¶]1Authenticate a request using Basic Authentication]]None;FTN£^hFor better type inference and to avoid usage of a data family, we newtype wrap the combination of some a8 and a function to add authentication data to a request4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGEaš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 CHANGEb>Handy helper to avoid wrapping datatypes in tuples everywhere.4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGE^_`aba^_`b^_`None <>?FTVOÀdHow to make a request.cgfedhicdefghicdefgNone,-.;<=>?FSTV»±j6Singleton type representing a client for an empty API.l^This class lets us define how each API combinator influences the creation of an HTTP request.)Unless you are writing a new backend for servant-client-core\ or new combinators that you want to support client-generation, you can ignore this class.ooJ allows you to produce operations to query an API from a client within a c monad. ÿTtype MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] Book -- POST /books myApi :: Proxy MyApi myApi = Proxy clientM :: Proxy ClientM clientM = Proxy getAllBooks :: ClientM [Book] postNewBook :: Book -> ClientM Book (getAllBooks :<|> postNewBook) = myApi `clientIn` clientMv"Make the querying function append path to the request path.w If you use a ReqBodyš in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your ReqBodyg. 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 -> ClientM Book addBook = client myApi -- then you can just use "addBook" to query that endpointxPick a MethodK and specify where the server you want to query is. You get back the full ,.y If you use a Žs 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 Ž.Example: ÿ>type MyApi = "books" :> QueryFlag "published" :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooks :: Bool -> 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_ booksz 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: ÿqtype MyApi = "books" :> QueryParams "authors" Text :> Get '[JSON] [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: [Text] -> 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 Heinlein{ If you use a  QueryParamš in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your  QueryParam, 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 -> 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 Asimov|Ignore ” in client functions.}Ignore • in client functions.~Using a –= combinator in your API doesn't affect the client functions. If you use a Headerš in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your Header, 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 -> 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 arguments… If you use a —¥ in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of a list 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.GYou can control how these values are turned into text by specifying a ’ instance of your type.Example: ]type MyAPI = "src" :> CaptureAll Text -> Get '[JSON] SourceFile myApi :: Proxy myApi = Proxy …getSourceFile :: [Text] -> ClientM SourceFile getSourceFile = client myApi -- then you can use "getSourceFile" to query that endpoint† If you use a Captureš in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your Capture|. 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 -> ClientM Book getBook = client myApi -- 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 :: ClientM [Book] postNewBook :: Book -> ClientM Book (getAllBooks :<|> postNewBook) = client myApiˆThe client for ™ is simply j. Ìtype MyAPI = "books" :> Get '[JSON] [Book] -- GET /books :<|> "nothing" :> EmptyAPI myApi :: Proxy MyApi myApi = Proxy getAllBooks :: ClientM [Book] (getAllBooks :<|> EmptyClient) = client myApijklnmoolmn‡jkˆ†…„ƒ‚€~}|{zyxwvutsrqpjklmnNone¼“C  !)*+,-./0123456789:;<=>?@ABCDEFGHIJ]^_`abcdefgjklmno8olmn56789:;<=>E34b]^_`a !?@ABCDjk,-./012cdefg)*+HGFIJ None¾·#  !),-./012?@ABCDjklmn$lmn,)-./012 !?@ABCDjk š       !"#$%&'()*+,-./011234356789:;<;=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abccdefghijklmnnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜–—™“”š›œžŸ “¡¢“¡£¤¥¦“§¨“©ª“«¬­/servant-client-core-0.13-DCvzKzA1mBvGLqBbRwhkUX$Servant.Client.Core.Internal.BaseUrl$Servant.Client.Core.Internal.Generic$Servant.Client.Core.Internal.Request&Servant.Client.Core.Internal.BasicAuth!Servant.Client.Core.Internal.Auth&Servant.Client.Core.Internal.RunClient&Servant.Client.Core.Internal.HasClientServant.Client.CoreServant.Client.Core.ReexportInvalidBaseUrlExceptionBaseUrl baseUrlScheme baseUrlHost baseUrlPort baseUrlPathSchemeHttpHttps showBaseUrl parseBaseUrl $fEqBaseUrl"$fExceptionInvalidBaseUrlException $fShowScheme $fEqScheme $fOrdScheme$fGenericScheme $fShowBaseUrl $fOrdBaseUrl$fGenericBaseUrl$fShowInvalidBaseUrlException GClientList gClientList ClientList GClientLikeL gMkClientL GClientLikeP gMkClientP ClientLikemkClientgenericMkClientLgenericMkClientP$fGClientLikeL[][]$fGClientListclientacc$fGClientList:<|>acc$fGClientLikeL::$fGClientLikePa:$fGClientLikeP:<|>:$fClientLike(->)(->)StreamingResponserunStreamingResponseResponse GenResponseresponseStatusCoderesponseHeadersresponseHttpVersion responseBody RequestBodyRequestBodyLBSRequestRequestF requestPathrequestQueryString requestBody requestAcceptrequestHeadersrequestHttpVersion requestMethod ServantErrorFailureResponse DecodeFailureUnsupportedContentTypeInvalidContentTypeHeaderConnectionErrordefaultRequest appendToPathappendToQueryString addHeadersetRequestBodyLBSsetRequestBody$fExceptionServantError$fEqRequestBody$fOrdRequestBody$fReadRequestBody$fShowRequestBody $fEqRequestF$fShowRequestF$fFunctorRequestF$fGenericRequestF$fEqGenResponse$fShowGenResponse$fGenericGenResponse$fFunctorGenResponse$fFoldableGenResponse$fTraversableGenResponse$fEqServantError$fShowServantError$fGenericServantError basicAuthReqAuthenticatedRequest unAuthReqAuthClientDatamkAuthenticatedRequest RunClient runRequeststreamingRequestthrowServantErrorcatchServantErrorcheckContentTypeHeader decodedAs EmptyClient HasClientClientclientWithRouteclientIn$fHasClientm:>$fHasClientm:>0$fHasClientmWithNamedContext$fHasClientm:>1$fHasClientm:>2$fHasClientm:>3$fHasClientm:>4$fHasClientm:>5$fHasClientmRaw$fHasClientm:>6$fHasClientm:>7$fHasClientm:>8$fHasClientm:>9$fHasClientm:>10$fHasClientm:>11$fHasClientm:>12$fHasClientmStream$fHasClientmVerb$fHasClientmVerb0$fHasClientmVerb1$fHasClientmVerb2$fHasClientm:>13$fHasClientm:>14$fHasClientm:<|>$fHasClientmEmptyAPI$fEqEmptyClient$fShowEmptyClient$fBoundedEmptyClient$fEnumEmptyClient+generics-sop-0.3.2.0-DVZ1EAz7WZT3T0121HR4y2Generics.SOP.UniverseGeneric"servant-0.13-C7ShdXgoa8S3GCHcjpSreServant.API.QueryParam QueryFlagghc-prim GHC.TypesBoolFalse QueryParams,http-api-data-0.3.7.2-48FhinoBl6ZEm7tWDTteoCWeb.Internal.HttpApiData ToHttpApiDatabaseGHC.BaseNothingServant.API.Description DescriptionSummary(http-types-0.12.1-JzZvcRdWXyqAz0RFuXL3weNetwork.HTTP.Types.Version HttpVersionServant.API.Capture CaptureAllServant.API.Alternative:<|>Servant.API.EmptyEmptyAPI