0a1d32d21e
There are several HTTP status codes that correspond to a response body with `NoContent`. This commit introduces `NoContentVerbWithStatus` which generalizes `NoContentVerb` to cases when the return status may be different from 204. The former replaces the latter anywhere possible. `NoContentVerb` is kept as a special case of `NoContentVerbWithStatus` for backwards compatibility. |
||
---|---|---|
.. | ||
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.