ro[!      None 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://     NoneMLike !@ but allows all JSON values instead of just objects and arrays.  param name param value    None )24=JKMThis 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. 0type MyApi = "books" :> Get [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: BaseUrl -> EitherT String IO [Book] postNewBook :: Book -> BaseUrl -> EitherT String IO Book (getAllBooks :<|> postNewBook) = client myApi""Make the querying function append path to the request path.# 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 $g. 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 % instance.Example: type MyApi = "books" :> ReqBody Book :> Post Book myApi :: Proxy MyApi myApi = Proxy addBook :: Book -> BaseUrl -> EitherT String IO Book addBook = client myApi -- then you can just use "addBook" to query that endpoint&Pick a Methodm and specify where the server you want to query is. You get back the status code and the response body as a '.( 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: Ktype MyApi = "books" :> QueryFlag "published" :> Get [Book] myApi :: Proxy MyApi myApi = Proxy getBooks :: Bool -> BaseUrl -> EitherT String IO [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, 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 [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: [Text] -> BaseUrl -> EitherT String IO [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 0 in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your 0, enclosed in Maybe.?If you give Nothing, nothing will be added to the query string.If you give a non-1n 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: htype MyApi = "books" :> QueryParam "author" Text :> Get [Book] myApi :: Proxy MyApi myApi = Proxy getBooksBy :: Maybe Text -> BaseUrl -> EitherT String IO [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 Asimov2If you have a 3W 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.4If you have a 5W 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.6 If you use a 7 in one of your endpoints in your API, the corresponding querying function will automatically take an additional argument of the type specified by your 7, 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 Text deriving (Eq, Show, FromText, ToText) -- GET /view-my-referer type MyApi = "view-my-referer" :> Header "Referer" Referer :> Get Referer myApi :: Proxy MyApi myApi = Proxy viewReferer :: Maybe Referer -> BaseUrl -> EitherT String IO Book viewReferer = client myApi -- then you can just use "viewRefer" to query that endpoint -- specifying Nothing or Just "http://haskell.org/" as arguments8If you have a 9W 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.:If you have a ;W 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.< 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 Book myApi :: Proxy MyApi myApi = Proxy getBook :: Text -> BaseUrl -> EitherT String IO 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. 0type MyApi = "books" :> Get [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: BaseUrl -> EitherT String IO [Book] postNewBook :: Book -> BaseUrl -> EitherT String IO Book (getAllBooks :<|> postNewBook) = client myApi "#&(,/2468:<>    "#&(,/2468:<>@       !"#$%&'()*#+,-./01(234564578(29(:;<(2=>?@A(BCD(EFG(HIJ(KLM(NOP(QRS(TUVservant-client-0.2Servant.Common.BaseUrlServant.Common.ReqServant.ClientBaseUrl baseUrlScheme baseUrlHost baseUrlPortSchemeHttpsHttp showBaseUrl parseBaseUrlReqreqPathqsreqBodyheadersdefReq appendToPathappendToQueryString addHeader setRQBody reqToRequest __manager__withGlobalManagerdisplayHttpRequestperformRequestperformRequestJSONcatchStatusCodeException decodeLenient HasClientClientclientWithRouteclient aeson-0.8.0.2 Data.Aesondecode $fHasClient:>$fHasClient:>0 servant-0.2Servant.API.ReqBodyReqBodyData.Aeson.Types.ClassToJSON$fHasClientRawbytestring-0.10.4.0Data.ByteString.Lazy.Internal ByteString$fHasClient:>1Servant.API.QueryParam QueryFlagghc-prim GHC.TypesBoolFalse$fHasClient:>2 QueryParamsServant.Common.TextToText$fHasClient:>3 QueryParambase Data.MaybeNothing$fHasClientPutServant.API.PutPut$fHasClientPostServant.API.PostPost$fHasClient:>4Servant.API.HeaderHeader$fHasClientGetServant.API.GetGet$fHasClientDeleteServant.API.DeleteDelete$fHasClient:>5Servant.API.CaptureCapture$fHasClient:<|>Servant.API.Alternative:<|>