``` val UnsupportedMediaType = HttpStatusCo...
# ktor
m
Copy code
val UnsupportedMediaType = HttpStatusCode(415, "Unsupported Media Type")
        val RequestedRangeNotSatisfiable = HttpStatusCode(416, "Requested Range Not Satisfiable")
        val ExceptionFailed = HttpStatusCode(417, "Exception Failed")
        val UpgradeRequired = HttpStatusCode(426, "Upgrade Required")
        val TooManyRequests = HttpStatusCode(429, "Too Many Requests")
        val RequestHeaderFieldTooLarge = HttpStatusCode(431, "Request Header Fields Too Large")
I was wanting to use "422 Unprocessable Entity", but there isn't a constant for it in
io.ktor.http.HttpStatusCode
yet. Is it a case of "PRs welcome", or is there a deliberate reason not to include certain codes?
c
Well, 422 status code is introduced as part of webdav
so it't not a regular HTTP status code
I'd say we have to include all webdav status codes or none
On the other hand PRs are always welcome 🙂
m
😁
Yeah, I've seen 422 used a few times in REST-y APIs that had nothing to do with WebDAV simply because it happens to have a useful semantics
o
You can easily define an extension property
m