aboutsummaryrefslogtreecommitdiff
path: root/okhttp-client-handler
diff options
context:
space:
mode:
Diffstat (limited to 'okhttp-client-handler')
-rw-r--r--okhttp-client-handler/src/main/scala/com/softwaremill/sttp/okhttp/OkHttpClientHandler.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/okhttp-client-handler/src/main/scala/com/softwaremill/sttp/okhttp/OkHttpClientHandler.scala b/okhttp-client-handler/src/main/scala/com/softwaremill/sttp/okhttp/OkHttpClientHandler.scala
index 7388bb1..9bc865e 100644
--- a/okhttp-client-handler/src/main/scala/com/softwaremill/sttp/okhttp/OkHttpClientHandler.scala
+++ b/okhttp-client-handler/src/main/scala/com/softwaremill/sttp/okhttp/OkHttpClientHandler.scala
@@ -123,7 +123,7 @@ class OkHttpSyncClientHandler private (client: OkHttpClient)
override def send[T](r: Request[T, Nothing]): Response[T] = {
val request = convertRequest(r)
val response = client.newCall(request).execute()
- readResponse(response, r.responseAs)
+ readResponse(response, r.response)
}
override def responseMonad: MonadError[Id] = IdMonad
@@ -152,7 +152,7 @@ abstract class OkHttpAsyncClientHandler[R[_], S](client: OkHttpClient,
error(e)
override def onResponse(call: Call, response: OkHttpResponse): Unit =
- try success(readResponse(response, r.responseAs))
+ try success(readResponse(response, r.response))
catch { case e: Exception => error(e) }
})
})