jsonResponse

inline fun <T : Any> jsonResponse(body: T, init: ResponseInit = ResponseInit( status = 200, statusText = "OK", headers = Headers().apply { jsonContentType() } )): Response(source)

Creates a Response with json content-type header and body as body. The response status (200 by default) and headers can be changed by supplying init.