servant-client: automatical derivation of querying functions for servant webservices
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
- servant-client-0.2.2.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
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
- AlpMestanogullari, DavidJohnson, GaelDeest, SoenkeHahn, ChristianMarie, phadej, MatthiasFischmann, jkarni, maksbotan, hecate, arianvp, fisx, janus
For package maintainers and hackage trustees
Candidates
| 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, 0.20.2, 0.20.3.0 (info) |
|---|---|
| Dependencies | aeson, attoparsec, base (>=4.7 && <5), bytestring, either (<5), exceptions, http-client (<0.5), http-client-tls, http-types, network-uri (>=2.6), safe, servant (>=0.2.2 && <0.3), string-conversions, text, transformers [details] |
| Tested with | ghc >=7.8 |
| License | BSD-3-Clause |
| Copyright | 2014 Zalora South East Asia Pte Ltd |
| Author | Alp Mestanogullari, Sönke Hahn, Julian K. Arni |
| Maintainer | [email protected] |
| Revised | Revision 2 made by phadej at 2017-12-10T20:59:46Z |
| 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 jkarni at 2015-03-02T13:25:40Z |
| Distributions | Arch:0.20.3.0, Debian:0.16.0.1, Fedora:0.20.2, LTSHaskell:0.20.3.0, NixOS:0.20.2, Stackage:0.20.3.0, openSUSE:0.20.3.0 |
| Reverse Dependencies | 133 direct, 32 indirect [details] |
| Downloads | 55808 total (263 in the last 30 days) |
| Rating | 2.25 (votes: 2) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2015-03-02 [all 1 reports] |