servant-client-core: Core functionality and class for client function generation for servant APIs

[ bsd3, library, servant, web ] [ Propose Tags ]
This version is deprecated.

This library provides backend-agnostic generation of client functions. For more information, see the README.


[Skip to Readme]

Modules

[Last Documentation]

  • Servant
    • Client
      • Servant.Client.Core
        • Servant.Client.Core.Auth
        • Servant.Client.Core.BaseUrl
        • Servant.Client.Core.BasicAuth
        • Servant.Client.Core.ClientError
        • Servant.Client.Core.HasClient
        • Servant.Client.Core.Reexport
        • Servant.Client.Core.Request
        • Servant.Client.Core.Response
        • Servant.Client.Core.RunClient
      • Servant.Client.Free
      • Servant.Client.Generic

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.12, 0.13, 0.13.0.1, 0.14, 0.14.1, 0.15, 0.16, 0.17, 0.18, 0.18.1, 0.18.2, 0.18.3, 0.19, 0.20, 0.20.1, 0.20.2 (info)
Change log CHANGELOG.md
Dependencies aeson (>=1.4.1.0 && <3), base (<0), base-compat (>=0.10.5 && <0.15), base64-bytestring (>=1.0.0.1 && <1.3), bytestring (>=0.10.8.1 && <0.13), constraints (>=0.2 && <0.15), containers (>=0.5.7.1 && <0.7), deepseq (>=1.4.2.0 && <1.6), exceptions (>=0.10.0 && <0.11), free (>=5.1 && <5.3), http-media (>=0.7.1.3 && <0.9), http-types (>=0.12.2 && <0.13), network-uri (>=2.6.1.0 && <2.7), safe (>=0.3.17 && <0.4), servant (>=0.20), sop-core (>=0.4.0.0 && <0.6), template-haskell (>=2.11.1.0 && <2.22), text (>=1.2.3.0 && <2.2) [details]
License BSD-3-Clause
Copyright 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
Author Servant Contributors
Maintainer haskell-servant-maintainers@googlegroups.com
Revised Revision 2 made by maksbotan at 2024-05-17T21:00:58Z
Category Servant, Web
Home page http://docs.servant.dev/
Bug tracker http://github.com/haskell-servant/servant/issues
Source repo head: git clone http://github.com/haskell-servant/servant.git
Uploaded by maksbotan at 2024-05-16T22:09:11Z
Distributions Arch:0.20.2, Debian:0.16, Fedora:0.19, LTSHaskell:0.20.2, NixOS:0.20, Stackage:0.20.2, openSUSE:0.20.2
Reverse Dependencies 58 direct, 120 indirect [details]
Downloads 25234 total (245 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-05-16 [all 2 reports]

Readme for servant-client-core-0.20.1

[back to package description]

servant-client-core

servant

HTTP-client-agnostic client functions for servant APIs.

This library should mainly be of interest to backend- and combinator-writers.

For backend-writers

If you are creating a new backend, you'll need to:

  1. Define a RunClient instance for your datatype (call it MyMonad)
  2. Define a ClientLike instance. This will look like:
instance ClientLike (MyMonad a) (MyMonad a) where
  mkClient = id
  1. Re-export the module Servant.Client.Core.Reexport so that your end-users can be blissfully unaware of 'servant-client-core', and so each backend-package comes closer to the warm hearth of the drop-in-replacement equivalence class.

For combinator-writers

You'll need to define a new HasClient instance for your combinator. There are plenty of examples to guide you in the HasClient module.