From aabb9ad2370b647bdc8e88dcdc09eba0e52d77a8 Mon Sep 17 00:00:00 2001 From: Konrad Malawski Date: Sun, 6 Dec 2015 02:24:08 +0100 Subject: [PATCH] +htc add `text/csv(UTF-8)` ContentType "CSV files considered the ultimate integration pattern" :wink: Adding the ContentType here is useful when someone wants to render a raw response which we know is a csv (i.e. fed from a file) --- .../src/main/scala/akka/http/scaladsl/model/ContentType.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/akka-http-core/src/main/scala/akka/http/scaladsl/model/ContentType.scala b/akka-http-core/src/main/scala/akka/http/scaladsl/model/ContentType.scala index e2bf86910c..01305c89a1 100644 --- a/akka-http-core/src/main/scala/akka/http/scaladsl/model/ContentType.scala +++ b/akka-http-core/src/main/scala/akka/http/scaladsl/model/ContentType.scala @@ -105,6 +105,7 @@ object ContentTypes { val `text/plain(UTF-8)` = MediaTypes.`text/plain` withCharset HttpCharsets.`UTF-8` val `text/html(UTF-8)` = MediaTypes.`text/html` withCharset HttpCharsets.`UTF-8` val `text/xml(UTF-8)` = MediaTypes.`text/xml` withCharset HttpCharsets.`UTF-8` + val `text/csv(UTF-8)` = MediaTypes.`text/csv` withCharset HttpCharsets.`UTF-8` // used for explicitly suppressing the rendering of Content-Type headers on requests and responses val NoContentType = ContentType(MediaTypes.NoMediaType)