aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-08-03 20:51:45 +0200
committeradamw <adam@warski.org>2017-08-03 20:51:45 +0200
commitc81487ff2c6d0a4a886ac9ceb7a7a89a39eb5c88 (patch)
tree539885d59911e7596d775a2ff7e36b02a237b859
parent6d73f1411c9c0639eb68dc2bcfaf9631dfd0f23b (diff)
downloadsttp-c81487ff2c6d0a4a886ac9ceb7a7a89a39eb5c88.tar.gz
sttp-c81487ff2c6d0a4a886ac9ceb7a7a89a39eb5c88.tar.bz2
sttp-c81487ff2c6d0a4a886ac9ceb7a7a89a39eb5c88.zip
Custom backends readme
-rw-r--r--README.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/README.md b/README.md
index 9721bed..25f51d4 100644
--- a/README.md
+++ b/README.md
@@ -356,6 +356,16 @@ both a **synchronous** (`OkHttpSyncClientHandler`) and **asynchronous**
OkHttp fully supports HTTP/2.
+### Custom backends, logging, metrics
+
+It is also entirely possible to write your own backend (if so, please consider
+contributing!) or wrapping an existing one. You can even write completely
+generic wrappers for any delegate backend, as the each backend comes equipped
+with a monad for the response wrapper.
+
+This brings the possibility to `map` and `flatMap` over responses. That way you
+could implement e.g. a logging or metric-capturing wrapper.
+
## Request type
All request descriptions have type `RequestT[U, T, S]` (T as in Template).