No description
Find a file
2015-02-02 13:35:10 +11:00
src/Servant Merge branch 'tvh-support-tls' 2015-02-02 12:39:55 +11:00
test Fix tests -- Capture cannot be empty 2015-02-02 13:35:10 +11:00
.gitignore Added support for matrix parameters. 2015-01-01 23:43:29 +01:00
.travis.yml Travis: use current HEAD of servant-server 2015-01-28 21:00:28 +11: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 polish up cabal file, add a README 2014-12-08 11:10:51 +01:00
servant-client.cabal Add TLS support 2015-01-23 09:18:13 +11:00
Setup.hs adapt to servant/servant-server split, prepare release 2014-12-10 16:51:05 +01:00

servant-client

Build Status

servant

This library lets you derive automatically 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