Specify supported media types when sending “415 unsupported media type”

后端 未结 4 557
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-11 11:26

If a clients sends data in an unsupported media type to a HTTP server, the server answers with status \"415 unsupported media type\". But how to tell the client what media t

4条回答
  •  清歌不尽
    2021-01-11 11:34

    There is no specification at all for what to do in this case, so expect implementations to be all over the place. (What would be sensible would be if the server's response included something like an Accept: header since that has pretty much the right semantics, if currently in the wrong direction.)

提交回复
热议问题