This library lets you automatically derive Haskell functions that let you query each endpoint of a servant webservice.
type MyApi = "books" :> Get '[JSON] [Book] -- GET /books :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books myApi :: Proxy MyApi myApi = Proxy getAllBooks :: Manager -> BaseUrl -> ExceptT String IO [Book] postNewBook :: Book -> Manager -> BaseUrl -> ExceptT String IO Book -- 'client' allows you to produce operations to query an API from a client. (getAllBooks :<|> postNewBook) = client myApi
Factored out into
servant-client-coreall the functionality that was independent of the
- Path components are escaped (#696)
reqPathfield changed from
Reqin failure errors (#740)
There shouldn't be breaking changes. Released as a part of
Add MonadBase and MonadBaseControl instances for ClientM (#663)
client asks for any content-type in Accept contentTypes non-empty list (#615)
ClientLikeclass that matches client functions generated using
clientwith client data structure. (#640)
Allow direct use of 'RequestBody' (#661)
Add MonadThrow and MonadCatch instances for ClientM
clientnow returns a ClientM which is a Reader for BasicEnv. BasicEnv comprises the HttpManager and BaseUrl that have had to be passed to each method returned by
- Support GHC 8.0
clientno longer takes
Managerarguments. Instead, each function returned by
clientrequires these two arguments.
- Use the
textpackage instead of
- Support for the
- Added support for
clientnow takes an explicit
- Client functions now consider any 2xx successful.
- Remove matrix params.
- Added support for Basic authentication
- Add generalized authentication support via the
AuthClientDatatype family and
Delete cts ()now does not care at all about content types provided.
Deletenow is like
Patchand returns a response body
- Support content-type aware combinators and
- Added a lot of tests
- Support multiple concurrent threads
ServantErrorto report Errors instead of
- Make the clients for
Rawendpoints return the whole
Responsevalue (to be able to access response headers for example)
- Support for PATCH
- Make () instances expect No Content status code, and not try to decode body.
- Add support for response headers
- Add TLS support
- Add matrix parameter support