diff options
author | adamw <adam@warski.org> | 2017-10-17 17:28:50 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-10-17 17:28:50 +0200 |
commit | 6e109a964383bfe5e2be04f65fa7cc1356a97cbe (patch) | |
tree | 7764ff94d72e0ffbf1e593fb8c5886562dc57f33 /docs/backends/tagging.rst | |
parent | 06bd5c95d04dd57e1b6c2572b94336b8fdb68bfa (diff) | |
download | sttp-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.rst | 9 |
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. + |