diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/com/softwaremill/sttp/RequestT.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/scala/com/softwaremill/sttp/RequestT.scala b/core/src/main/scala/com/softwaremill/sttp/RequestT.scala index 27ed7f3..020e926 100644 --- a/core/src/main/scala/com/softwaremill/sttp/RequestT.scala +++ b/core/src/main/scala/com/softwaremill/sttp/RequestT.scala @@ -225,6 +225,11 @@ case class RequestT[U[_], T, +S]( def followRedirects(fr: Boolean): RequestT[U, T, S] = this.copy(options = options.copy(followRedirects = fr)) + def tag(k: String, v: Any): RequestT[U, T, S] = + this.copy(tags = tags + (k -> v)) + + def tag(k: String): Option[Any] = tags.get(k) + def send[R[_]]()(implicit handler: SttpHandler[R, S], isIdInRequest: IsIdInRequest[U]): R[Response[T]] = { // we could avoid the asInstanceOf by creating an artificial copy |