aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2018-03-05 09:04:43 +0100
committeradamw <adam@warski.org>2018-03-05 09:04:43 +0100
commita38dfc9475c61e3cd6b489f35526ec8f4c70f6a5 (patch)
tree7eff23145ad4052b45d1288e80b42bc9236c7c4f /core
parent4e378fb5b6e1775fc1d4854b53243b51a80cc147 (diff)
downloadsttp-a38dfc9475c61e3cd6b489f35526ec8f4c70f6a5.tar.gz
sttp-a38dfc9475c61e3cd6b489f35526ec8f4c70f6a5.tar.bz2
sttp-a38dfc9475c61e3cd6b489f35526ec8f4c70f6a5.zip
#66: docs on response replacing the whole specification
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/com/softwaremill/sttp/RequestT.scala5
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 26eb0f1..91635e1 100644
--- a/core/src/main/scala/com/softwaremill/sttp/RequestT.scala
+++ b/core/src/main/scala/com/softwaremill/sttp/RequestT.scala
@@ -215,6 +215,11 @@ case class RequestT[U[_], T, +S](
def readTimeout(t: Duration): RequestT[U, T, S] =
this.copy(options = options.copy(readTimeout = t))
+ /**
+ * Specifies the target type to which the response body should be read.
+ * Note that this replaces any previous specifications, which also includes
+ * any previous `mapResponse` invocations.
+ */
def response[T2, S2 >: S](ra: ResponseAs[T2, S2]): RequestT[U, T2, S2] =
this.copy(response = ra)