aboutsummaryrefslogtreecommitdiff
path: root/docs/backends/tagging.rst
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-10-17 17:28:50 +0200
committeradamw <adam@warski.org>2017-10-17 17:28:50 +0200
commit6e109a964383bfe5e2be04f65fa7cc1356a97cbe (patch)
tree7764ff94d72e0ffbf1e593fb8c5886562dc57f33 /docs/backends/tagging.rst
parent06bd5c95d04dd57e1b6c2572b94336b8fdb68bfa (diff)
downloadsttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.tar.gz
sttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.tar.bz2
sttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.zip
More docs
Diffstat (limited to 'docs/backends/tagging.rst')
-rw-r--r--docs/backends/tagging.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/backends/tagging.rst b/docs/backends/tagging.rst
new file mode 100644
index 0000000..15773ff
--- /dev/null
+++ b/docs/backends/tagging.rst
@@ -0,0 +1,9 @@
+Request tagging
+===============
+
+Each request contains a ``tags: Map[String, Any]`` map. This map can be used to tag the request with any backend-specific information, and isn't used in any way by sttp itself.
+
+Tags can be added to a request using the ``def tag(k: String, v: Any)`` method, and read using the ``def tag(k: String): Option[Any]`` method.
+
+Backends, or :ref:`backend wrappers <custombackends>` can use tags e.g. for logging, passing a metric name, using different connection pools, or even different delegate backends.
+