diff options
author | vlad <vlad@driver.xyz> | 2017-06-13 16:15:07 -0700 |
---|---|---|
committer | vlad <vlad@driver.xyz> | 2017-06-13 16:15:07 -0700 |
commit | 91a4120b4253dc4a1e9552ec39fcb25c303a21e1 (patch) | |
tree | 9173797ed8e3d780f98ac8d0f85507eeb10c8016 /src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala | |
parent | cd1b635b2ae90d9ac2d8b1779183a1fbd8c5fd5c (diff) | |
download | rest-query-d55b202095f733138d5583966984c22e102c08f8.tar.gz rest-query-d55b202095f733138d5583966984c22e102c08f8.tar.bz2 rest-query-d55b202095f733138d5583966984c22e102c08f8.zip |
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala b/src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala index 6ad404f..d7bc3d3 100644 --- a/src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala +++ b/src/main/scala/xyz/driver/pdsuicommon/http/AsyncHttpClientUploader.scala @@ -50,16 +50,18 @@ class AsyncHttpClientUploader(settings: Settings) extends Closeable with StrictL q.addHeader("Content-Type", contentType) - httpClient.prepareRequest(q).execute(new AsyncCompletionHandler[Unit] { - override def onCompleted(response: Response): Unit = { - promise.success(response) - } - - override def onThrowable(t: Throwable): Unit = { - promise.failure(t) - super.onThrowable(t) - } - }) + httpClient + .prepareRequest(q) + .execute(new AsyncCompletionHandler[Unit] { + override def onCompleted(response: Response): Unit = { + promise.success(response) + } + + override def onThrowable(t: Throwable): Unit = { + promise.failure(t) + super.onThrowable(t) + } + }) // see AsyncHttpClientFetcher val parentMdcContext = MDC.getCopyOfContextMap |