servant-client: automatical derivation of querying functions for 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
Versions [faq] 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
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.1 && <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 4 made by phadej at Sun Dec 10 20:59:31 UTC 2017
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 Wed Dec 10 15:50:52 UTC 2014
Distributions Debian:0.14, Fedora:0.14, LTSHaskell:0.15, NixOS:0.16, Stackage:0.16
Downloads 17600 total (271 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

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'.

Maintainer's Corner

For package maintainers and hackage trustees