servant-client: automatical derivation of haskell functions that let you query servant webservices

[ bsd3, library, servant, web ] [ Propose Tags ]

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

Example below.

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
(getAllBooks :<|> postNewBook) = client myApi

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Versions [RSS] 0.2, 0.2.1, 0.2.2, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.3.1, 0.4.4, 0.4.4.2, 0.4.4.3, 0.4.4.4, 0.4.4.5, 0.4.4.6, 0.4.4.7, 0.5, 0.6, 0.6.1, 0.7, 0.7.1, 0.8, 0.8.1, 0.9, 0.9.0.1, 0.9.1, 0.9.1.1, 0.10, 0.11, 0.12, 0.12.0.1, 0.13, 0.13.0.1, 0.14, 0.15, 0.16, 0.16.0.1, 0.17, 0.18, 0.18.1, 0.18.2, 0.18.3, 0.19, 0.20, 0.20.1 (info)
Dependencies aeson, attoparsec, base (>=4.7 && <5), bytestring, either (<5), exceptions, http-client (<0.5), http-types, network-uri (>=2.6), safe, servant (>=0.2 && <0.3), string-conversions, text, transformers [details]
License BSD-3-Clause
Copyright 2014 Zalora South East Asia Pte Ltd
Author Alp Mestanogullari, Sönke Hahn, Julian K. Arni
Maintainer alpmestan@gmail.com
Revised Revision 3 made by phadej at 2017-12-10T21:00:19Z
Category Web
Home page http://haskell-servant.github.io/
Bug tracker http://github.com/haskell-servant/servant-client/issues
Source repo head: git clone http://github.com/haskell-servant/servant-client.git
Uploaded by AlpMestanogullari at 2014-12-09T14:35:43Z
Distributions Arch:0.20, Debian:0.16.0.1, Fedora:0.19, LTSHaskell:0.20, NixOS:0.20, Stackage:0.20
Reverse Dependencies 125 direct, 30 indirect [details]
Downloads 52481 total (219 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]