ktorio / ktor

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

ContentType should be MimeType #1315

Open saschpe opened 5 years ago

saschpe commented 5 years ago

Is your feature request related to a problem? Please describe. HTTP does not know about a content type, it's all about MIME types. Others than the "Content-Type:" HTTP header, the "Accept:" header takes a MIME type as well. It's a little confusing when using ContentType.Application.Json instead of MimeType.Application.Json

Describe the solution you'd like Rename ContentType to MimeType

e5l commented 5 years ago

Hi @saschpe, thanks for the report. We could introduce type alias at least.

saschpe commented 5 years ago

That would make sense to avoid an API break. One way would be to rename, add a compat typealias with maybe a deprecation warning..

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.