diff options
author | adamw <adam@warski.org> | 2017-07-19 22:07:53 +0200 |
---|---|---|
committer | adamw <adam@warski.org> | 2017-07-19 22:07:53 +0200 |
commit | f6ab8cde0f18b7e932e6156076fe299a79f8b22b (patch) | |
tree | add225f45332c8cf632aa88dd5c107c0c1452441 /akka-http-handler/src/main/scala/com/softwaremill | |
parent | b67b4798de0b1b599e57a2f9f54c35191b7bc26d (diff) | |
download | sttp-f6ab8cde0f18b7e932e6156076fe299a79f8b22b.tar.gz sttp-f6ab8cde0f18b7e932e6156076fe299a79f8b22b.tar.bz2 sttp-f6ab8cde0f18b7e932e6156076fe299a79f8b22b.zip |
New reformatterv0.0.1
Diffstat (limited to 'akka-http-handler/src/main/scala/com/softwaremill')
-rw-r--r-- | akka-http-handler/src/main/scala/com/softwaremill/sttp/akkahttp/AkkaHttpSttpHandler.scala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/akka-http-handler/src/main/scala/com/softwaremill/sttp/akkahttp/AkkaHttpSttpHandler.scala b/akka-http-handler/src/main/scala/com/softwaremill/sttp/akkahttp/AkkaHttpSttpHandler.scala index 01f68ef..fbb00a3 100644 --- a/akka-http-handler/src/main/scala/com/softwaremill/sttp/akkahttp/AkkaHttpSttpHandler.scala +++ b/akka-http-handler/src/main/scala/com/softwaremill/sttp/akkahttp/AkkaHttpSttpHandler.scala @@ -40,16 +40,16 @@ class AkkaHttpSttpHandler(actorSystem: ActorSystem) } private def methodToAkka(m: Method): HttpMethod = m match { - case Method.GET => HttpMethods.GET - case Method.HEAD => HttpMethods.HEAD - case Method.POST => HttpMethods.POST - case Method.PUT => HttpMethods.PUT - case Method.DELETE => HttpMethods.DELETE + case Method.GET => HttpMethods.GET + case Method.HEAD => HttpMethods.HEAD + case Method.POST => HttpMethods.POST + case Method.PUT => HttpMethods.PUT + case Method.DELETE => HttpMethods.DELETE case Method.OPTIONS => HttpMethods.OPTIONS - case Method.PATCH => HttpMethods.PATCH + case Method.PATCH => HttpMethods.PATCH case Method.CONNECT => HttpMethods.CONNECT - case Method.TRACE => HttpMethods.TRACE - case _ => HttpMethod.custom(m.m) + case Method.TRACE => HttpMethods.TRACE + case _ => HttpMethod.custom(m.m) } private def bodyFromAkka[T](rr: ResponseAs[T, S], @@ -119,13 +119,13 @@ class AkkaHttpSttpHandler(actorSystem: ActorSystem) .map(hc => ContentType.apply(ct.mediaType, () => hc)) .getOrElse(ct) ar.withEntity(ctWithEncoding, b.getBytes(encoding)) - case ByteArrayBody(b) => ar.withEntity(b) + case ByteArrayBody(b) => ar.withEntity(b) case ByteBufferBody(b) => ar.withEntity(ByteString(b)) case InputStreamBody(b) => ar.withEntity( HttpEntity(ct, StreamConverters.fromInputStream(() => b))) - case PathBody(b) => ar.withEntity(ct, b) - case StreamBody(s) => ar.withEntity(HttpEntity(ct, s)) + case PathBody(b) => ar.withEntity(ct, b) + case StreamBody(s) => ar.withEntity(HttpEntity(ct, s)) case SerializableBody(f, t) => doSet(f(t)) } |