How can I explicitly set the character encoding (e.g. UTF-8) in a response?
call.respondText("Hello World!", ContentType.Text.Plain, HttpStatusCode.OK)
How can I explicitly set the character encoding (e.g. UTF-8) in a response?
call.respondText("Hello World!", ContentType.Text.Plain, HttpStatusCode.OK)
You can call the withCharset method on a ContentType object to create a copy with specified charset:
call.respondText("Hello World!", ContentType.Text.Plain.withCharset(Charsets.UTF_8), HttpStatusCode.OK)