Go to file
2015-04-19 18:08:40 +02:00
src/Servant canonicalize api type before generating client functions, to flatten out all the client functions, distributing arguments properly: Client (a :> (b :<|> c)) = Client (a :> b) :<|> Client (a :> c) 2015-04-19 18:08:26 +02:00
test Return complete response in Raw endpoint 2015-03-16 11:12:11 +11:00
.ghci Add .ghci file 2015-03-25 15:36:08 +00:00
.gitignore Added support for matrix parameters. 2015-01-01 23:43:29 +01:00
.travis.yml Enable coveralls 2015-02-19 20:48:52 +01:00
CHANGELOG.md add a changelog entry for canonicalize 2015-04-19 18:08:40 +02:00
docs.sh adapt to servant/servant-server split, prepare release 2014-12-10 16:51:05 +01:00
LICENSE add LICENSE files to all projects 2014-12-01 16:38:43 +01:00
README.md Enable coveralls 2015-02-19 20:48:52 +01:00
servant-client.cabal Return complete response in Raw endpoint 2015-03-16 11:12:11 +11:00
Setup.hs adapt to servant/servant-server split, prepare release 2014-12-10 16:51:05 +01:00

servant-client

Build Status Coverage Status

servant

This library lets you automatically derive Haskell functions that let you query each endpoint of a servant webservice.

Example

type 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
-- 'client' allows you to produce operations to query an API from a client.
(getAllBooks :<|> postNewBook) = client myApi