| 219 fun renderJson(json: String) { |
219 fun renderJson(json: String) { |
| 220 response.contentType = "application/json; charset=utf-8" |
220 response.contentType = "application/json; charset=utf-8" |
| 221 response.writer.write(json) |
221 response.writer.write(json) |
| 222 } |
222 } |
| 223 |
223 |
| |
224 fun renderText(text: String, type: String = "plain") { |
| |
225 response.contentType = "text/${type}; charset=utf-8" |
| |
226 response.writer.write(text) |
| |
227 } |
| |
228 |
| 224 fun render(page: String? = null) { |
229 fun render(page: String? = null) { |
| 225 page?.let { contentPage = it } |
230 page?.let { contentPage = it } |
| 226 forward("site") |
231 forward("site") |
| 227 } |
232 } |
| 228 |
233 |