aboutsummaryrefslogtreecommitdiff
path: root/docs/backends/tagging.rst
diff options
context:
space:
mode:
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.
+