src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt

changeset 358
e46bef1bdddd
parent 351
3720c7375146
--- a/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Sun Mar 09 13:54:46 2025 +0100
+++ b/src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt	Sun Mar 09 15:57:52 2025 +0100
@@ -207,6 +207,11 @@
         forward("feed")
     }
 
+    fun renderJson(json: String) {
+        response.contentType = "application/json; charset=utf-8"
+        response.writer.write(json)
+    }
+
     fun render(page: String? = null) {
         page?.let { contentPage = it }
         forward("site")

mercurial