accept

fun Route.accept(contentType: <ERROR CLASS>, build: Route.() -> Unit): Route

Builds a route to match requests with the HttpHeaders.Accept header matching the specified contentType.

See also