accept

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

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