servant-client-core

Core functionality and class for client function generation for servant APIs

http://haskell-servant.readthedocs.org/

Version on this page:0.13.0.1
LTS Haskell 22.37:0.20.2
Stackage Nightly 2024-10-06:0.20.2
Latest on Hackage:0.20.2

See all snapshots servant-client-core appears in

BSD-3-Clause licensed by Servant Contributors
Maintained by [email protected]
This version can be pinned in stack with:servant-client-core-0.13.0.1@sha256:ad2ddf037b3f67f3eb9e7b5620216aa7e87d5810456a29847b5becdffa9b747f,3392

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.

Changes

The latest version of this document is on GitHub. Changelog for servant package contains significant entries for all core packages.

0.13.0.1

  • Support base-compat-0.10

0.13

  • Streaming endpoint support. (#836)
  • servant Add Servant.API.Modifiers (#873)

0.12

  • First version. Factored out of servant-client all the functionality that was independent of the http-client backend.