:wave: whats the proper way to configure accept mu...
# ktor
d
👋 whats the proper way to configure accept multiple content types on a server route (and fallback to json if none specified)?
Copy code
accept(ContentType) {
  // configure route
  post("foo") {...}
}
// configure same route as above?
post("foo") {...}
seems pretty redundant....
o
d
to an extent yeah I think I could do something like this
Copy code
val route = post("foo") { ... }
route.install(ContentNegotiation) {
  jackson(contentType = ContentType.parse("application/graphql-response+json")) 
  // fallback
  jackson(contentType = ContentType.Any)
}
thanks!