Reputation: 568
I'm looking into adding (more) precise responses to REST API client (4xx) errors. The direction seems quite clear, as seen here:
406 [sic] when you can't send what they want, 415 when they send what you don't want.
The difference seems to be that you can include allowed methods via the Allow header:
< PUT /api/articles/
> HTTP 405 Method Not Allowed
> Allow: POST
But there isn't any equivalent response header for:
< POST /api/images/
< Content-Type: text/html
> HTTP 415 Unsuported media
The way I see it, I have the following options:
Did I miss something obvious?
Upvotes: 0
Views: 96
Reputation: 42017
This proposal:
https://datatracker.ietf.org/doc/html/draft-wilde-accept-post-02
might be of interest.
Upvotes: 1