ktorio / ktor

Framework for quickly creating connected applications in Kotlin with minimal effort
https://ktor.io
Apache License 2.0
13.03k stars 1.06k forks source link

Allow passing multiple acceptable content types to accept route selector #1781

Open rock3r opened 4 years ago

rock3r commented 4 years ago

Subsystem Server, route building

Is your feature request related to a problem? Please describe. Right now the accept() route selector only takes a single content type.

Describe the solution you'd like It would be convenient if we could pass more than one, and it could match on any of the ones provided.

Motivation to include to ktor That would reduce the amount of duplication when multiple content types are handled by the same handler.

oleg-larshin commented 4 years ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.