úÎ!àš’–      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘ ’ “ ” • None%27: servant-client-corekSimple data type to represent the target of HTTP requests for servant's automatically-generated clients.servant-client-coreURI scheme to useservant-client-corehost (eg "haskell.org")servant-client-core port (eg 80)servant-client-core path (eg "ab/c")servant-client-coreURI scheme to use servant-client-corehttp:// servant-client-corehttps:// servant-client-core.showBaseUrl <$> parseBaseUrl "api.example.com""http://api.example.com" servant-client-coreparseBaseUrl "api.example.com"cBaseUrl {baseUrlScheme = Http, baseUrlHost = "api.example.com", baseUrlPort = 80, baseUrlPath = ""}Note: trailing slash is removedparseBaseUrl "api.example.com/"cBaseUrl {baseUrlScheme = Http, baseUrlHost = "api.example.com", baseUrlPort = 80, baseUrlPath = ""}#parseBaseUrl "api.example.com/dir/"gBaseUrl {baseUrlScheme = Http, baseUrlHost = "api.example.com", baseUrlPort = 80, baseUrlPath = "/dir"}servant-client-core:{'traverse_ (LBS8.putStrLn . encode) $ do& u1 <- parseBaseUrl "api.example.com"" u2 <- parseBaseUrl "example.com". return $ Map.fromList [(u1, 'x'), (u2, 'y')]:}7{"http://api.example.com":"x","http://example.com":"y"}servant-client-coreCparseBaseUrl "api.example.com" >>= decode . encode :: Maybe BaseUrljJust (BaseUrl {baseUrlScheme = Http, baseUrlHost = "api.example.com", baseUrlPort = 80, baseUrlPath = ""})servant-client-coreCtraverse_ (LBS8.putStrLn . encode) $ parseBaseUrl "api.example.com""http://api.example.com"    SafeŠ–None24567@AHSVX&] servant-client-core#The request body. R replica of the  http-client  RequestBody.2 servant-client-core9Set body and media type of the request being constructed.2The body is set to the given bytestring using the ! constructor.3 servant-client-core9Set body and media type of the request being constructed.0servant-client-core param nameservant-client-core param value !"#$%&'()*+,-./0123$%&'()*+,- !"#.1/032None=HV(}@servant-client-core1Authenticate a request using Basic Authentication@@None=HV2RAservant-client-corehFor better type inference and to avoid usage of a data family, we newtype wrap the combination of some D8 and a function to add authentication data to a request4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGEDservant-client-coreš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 CHANGEEservant-client-core>Handy helper to avoid wrapping datatypes in tuples everywhere.4NOTE: THIS API IS EXPERIMENTAL AND SUBJECT TO CHANGEABCDEDABCENone24567@AHSVX3 FGHIJKLMGFHIJKLMNone24567@AHSVX>Uservant-client-core0A type representing possible errors in a request2Note that this type substantially changed in 0.12.Vservant-client-coreFThe server returned an error response including the failing request. ' includes the  and the path of the request.Wservant-client-core2The body could not be decoded at the expected typeXservant-client-core1The content-type of the response is not supportedYservant-client-core"The content-type header is invalidZservant-client-core:There was a connection error, and no response was received[servant-client-coreNote: an exception in Z( might not be evaluated fully, We only — its ˜ ed value.UVWXYZUVWXYZNone 4>@AHVX@V`servant-client-core` cannot stream. Compare to e.fservant-client-coreHow to make a request.`abcdefgefgcd`abNone-./=>?@AHSUVXąfjservant-client-core6Singleton type representing a client for an empty API.lservant-client-core^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.pservant-client-corepJ allows you to produce operations to query an API from a client within a e 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` clientMwservant-client-core"Make the querying function append path to the request path.yservant-client-core 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 endpointzservant-client-corePick a MethodK and specify where the server you want to query is. You get back the full H.{servant-client-core 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_ books|servant-client-core 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}servant-client-core 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~servant-client-coreIgnore Ÿ in client functions.servant-client-coreIgnore   in client functions.€servant-client-coreUsing a Ą= combinator in your API doesn't affect the client functions.servant-client-core 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‰servant-client-core 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Šservant-client-core 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‹servant-client-coreA 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Œservant-client-coreThe 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 myApijklmnopplmnojk NoneąÔ  FGHIJKLMUVWXYZjklmno lmnoGFHIJKLMUVWXYZjk Noneģ A !"#$%&'()*+,-./0123@ABCDEFGHIJKLMUVWXYZcdefgjklmnopAplmno$%&'()*+,-. !"#E@ABCDUVWXYZjkGHIJKLMefg cdF10/23 None&'>Xĩx$ FGHIJKLMUVWXYZ`abjklmno‘‘`ab None ,>HSVXšv’servant-client-coreJA type that specifies that an API record contains a client implementation.“servant-client-core&Generate a record of client functions.”servant-client-core“ but with o in between.”servant-client-corenatural transformation’“”’“”Ĩ !"#$%&'()*+,-./01023456789:;<=>?@ABCDEFGHIJKLLMNOPQRQSTUVWXYZ[\]^_`abcdefghijklmnopqrsstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜ ™ š › œ  žŸ ĄĒĢĪĨͧĻĐŠĻĐŦĨĶŽ­ŪŊǰąĨēģĨēīĩķ·ĨļđĨšŧĨž―ū/servant-client-core-0.17-6TEb4JOolq16hAUWK9fzoLServant.Client.Core.BaseUrlServant.Client.Core.RequestServant.Client.Core.BasicAuthServant.Client.Core.AuthServant.Client.Core.ResponseServant.Client.Core.ClientErrorServant.Client.Core.RunClientServant.Client.Core.HasClientServant.Client.FreeServant.Client.GenericServant.Client.Core.InternalServant.Client.Core.ReexportServant.Client.CoreInvalidBaseUrlExceptionBaseUrl baseUrlScheme baseUrlHost baseUrlPort baseUrlPathSchemeHttpHttps showBaseUrl parseBaseUrl$fFromJSONKeyBaseUrl$fToJSONKeyBaseUrl$fFromJSONBaseUrl$fToJSONBaseUrl $fEqBaseUrl$fNFDataBaseUrl"$fExceptionInvalidBaseUrlException $fShowScheme $fEqScheme $fOrdScheme$fGenericScheme $fLiftScheme $fDataScheme $fShowBaseUrl $fOrdBaseUrl$fGenericBaseUrl $fLiftBaseUrl $fDataBaseUrl$fShowInvalidBaseUrlException RequestBodyRequestBodyLBS RequestBodyBSRequestBodySourceRequestRequestF requestPathrequestQueryString requestBody requestAcceptrequestHeadersrequestHttpVersion requestMethoddefaultRequest appendToPathappendToQueryString addHeadersetRequestBodyLBSsetRequestBody$fNFDataRequestF$fBitraversableRequestF$fBifoldableRequestF$fBifunctorRequestF$fShowRequestF$fShowRequestBody$fGenericRequestF $fEqRequestF$fFunctorRequestF$fFoldableRequestF$fTraversableRequestF$fGenericRequestBody basicAuthReqAuthenticatedRequest unAuthReqAuthClientDatamkAuthenticatedRequestStreamingResponseResponse ResponseFresponseStatusCoderesponseHeadersresponseHttpVersion responseBody$fNFDataResponseF $fEqResponseF$fShowResponseF$fGenericResponseF$fFunctorResponseF$fFoldableResponseF$fTraversableResponseF ClientErrorFailureResponse DecodeFailureUnsupportedContentTypeInvalidContentTypeHeaderConnectionError$fNFDataClientError$fExceptionClientError$fEqClientError$fShowClientError$fGenericClientErrorClientF RunRequestThrowRunStreamingClientwithStreamingRequest RunClient runRequestthrowClientError$fRunClientFree$fFunctorClientF EmptyClient HasClientClientclientWithRoutehoistClientMonadclientIn$fHasClientm:>$fHasClientm:>0$fHasClientmWithNamedContext$fHasClientm:>1$fHasClientm:>2$fHasClientm:>3$fHasClientm:>4$fHasClientm:>5$fHasClientm:>6$fHasClientmRaw$fHasClientm:>7$fHasClientm:>8$fHasClientm:>9$fHasClientm:>10$fHasClientm:>11$fHasClientm:>12$fHasClientm:>13$fHasClientmStream$fHasClientmStream0$fHasClientmVerb$fHasClientmVerb0$fHasClientmNoContentVerb$fHasClientmVerb1$fHasClientmVerb2$fHasClientm:>14$fHasClientm:>15$fHasClientm:<|>$fHasClientmEmptyAPI$fEqEmptyClient$fShowEmptyClient$fBoundedEmptyClient$fEnumEmptyClientclient AsClientT genericClientgenericClientHoist$fGenericModeAsClientT mediaTypeRnfdeepseq-1.4.4.0Control.DeepSeqrnfbaseGHC.Showshow#servant-0.17-8Vjq5OQ4ACpEksochsBg4TServant.API.QueryParam QueryFlagghc-prim GHC.TypesBoolFalse QueryParams,http-api-data-0.4.1.1-Fq5yRDilgZrJvJu6EwEz1sWeb.Internal.HttpApiData ToHttpApiData GHC.MaybeNothingServant.API.Description DescriptionSummary(http-types-0.12.3-A2cx1Lg5j0cKG76Sfj8L06Network.HTTP.Types.Version HttpVersionServant.API.Capture CaptureAllServant.API.Alternative:<|>Servant.API.EmptyEmptyAPI