73c87bc2bc
* bumped cabal-version field Cabal supports two types of licenses, native and SPDX, which can be seen here hackage.haskell.org/package/Cabal-3.6.2.0/docs/Distribution-Types-PackageDescription.html#v:licenseRaw Several packages use BSD-3-Clause as a license, in conjonction with cabal-version: >=1.10 which cabal parses as Right (UnknownLicense "BSD-3"). If I change teh cabal-version to cabal-version: 2.2 , cabal correctly identifdies the license License (ELicense (ELicenseId BSD_3_Clause)). * changed license from cabal to spdx format aka BSD3 -> BSD-3-Clause: next cabal may deprecate the old format |
||
---|---|---|
.. | ||
src/Servant/Client | ||
test | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
servant-client-core.cabal | ||
Setup.hs |
servant-client-core
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:
- Define a
RunClient
instance for your datatype (call itMyMonad
) - Define a
ClientLike
instance. This will look like:
instance ClientLike (MyMonad a) (MyMonad a) where
mkClient = id
- 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.