The servant-client package

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

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

See the client section of the tutorial.

CHANGELOG


[Skip to Readme]

Properties

Versions 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
Change log CHANGELOG.md
Dependencies aeson (>=1.2.3.0 && <1.3), attoparsec (>=0.13.2.0 && <0.14), base (>=4.7 && <4.11), base-compat (>=0.9.3 && <0.10), bytestring (>=0.10.4.0 && <0.11), containers (>=0.5.5.1 && <0.6), exceptions (>=0.8.3 && <0.9), http-client (>=0.5.7.1 && <0.6), http-client-tls (>=0.3.5.1 && <0.4), http-media (>=0.7.1.1 && <0.8), http-types (==0.12.*), monad-control (>=1.0.0.4 && <1.1), mtl (>=2.1 && <2.3), semigroupoids (>=5.2.1 && <5.3), semigroups (>=0.18.3 && <0.19), servant-client-core (==0.13.*), stm (>=2.4.4.1 && <2.5), text (>=1.2.3.0 && <1.3), time (>=1.4.2 && <1.9), transformers (>=0.3.0.0 && <0.6), transformers-base (>=0.4.4 && <0.5), transformers-compat (>=0.5.1 && <0.6) [details]
License BSD3
Copyright 2014-2016 Zalora South East Asia Pte Ltd, 2016-2017 Servant Contributors
Author Servant Contributors
Maintainer haskell-servant-maintainers@googlegroups.com
Category Servant, Web
Home page http://haskell-servant.readthedocs.org/
Bug tracker http://github.com/haskell-servant/servant/issues
Source repo head: git clone http://github.com/haskell-servant/servant.git
Uploaded Fri Feb 9 13:20:45 UTC 2018 by phadej
Distributions Fedora:0.12.0.1, LTSHaskell:0.11, NixOS:0.13, Stackage:0.12.0.1, openSUSE:0.11
Downloads 12886 total (306 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-02-09 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for servant-client-0.13

[back to package description]

servant-client

servant

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

Example

type MyApi = "books" :> Get '[JSON] [Book] -- GET /books
        :<|> "books" :> ReqBody Book :> Post '[JSON] Book -- POST /books

myApi :: Proxy MyApi
myApi = Proxy

getAllBooks :: Manager -> BaseUrl -> ExceptT String IO [Book]
postNewBook :: Book -> Manager -> BaseUrl -> ExceptT String IO Book
-- 'client' allows you to produce operations to query an API from a client.
(getAllBooks :<|> postNewBook) = client myApi