Don't forget content-types
authorLanius Trolling <lanius@laniustrolling.dev>
Sat, 6 Apr 2024 12:30:26 +0000 (08:30 -0400)
committerLanius Trolling <lanius@laniustrolling.dev>
Sat, 6 Apr 2024 12:30:26 +0000 (08:30 -0400)
src/jvmMain/kotlin/info/mechyrdia/lore/views_quote.kt

index 4b540edfcda10839e0cffe4495a5a9758773be42..033d170994eee27c2ca31111387a65cf5c42ae3a 100644 (file)
@@ -55,12 +55,12 @@ enum class QuoteFormat(val format: String?) {
        },
        JSON("json") {
                override suspend fun ApplicationCall.respondQuote(quote: Quote) {
-                       respondText(quote.toJson())
+                       respondText(quote.toJson(), contentType = ContentType.Application.Json)
                }
        },
        XML("xml") {
                override suspend fun ApplicationCall.respondQuote(quote: Quote) {
-                       respondText(quote.toXml())
+                       respondText(quote.toXml(), contentType = ContentType.Application.Xml)
                }
        },
        ;