servant/servant-client-core
Oleg Grenrus 1114925048 Allow free-5.1, lens-4.17 2018-07-05 23:21:36 +03:00
..
include Rewrite servant-client. 2017-09-14 09:54:13 -04:00
src/Servant/Client Merge servant-generic 2018-07-05 23:21:25 +03:00
test Move BaseUrlSpec 2017-09-14 09:54:13 -04:00
CHANGELOG.md Merge servant-generic 2018-07-05 23:21:25 +03:00
LICENSE Rewrite servant-client. 2017-09-14 09:54:13 -04:00
README.md Review fixes 2017-09-15 09:15:46 -04:00
Setup.hs stylish-haskell servant-client-core 2018-06-30 22:17:08 +03:00
servant-client-core.cabal Allow free-5.1, lens-4.17 2018-07-05 23:21:36 +03:00

README.md

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.