400 BAD request HTTP error code meaning?

前端 未结 8 1412
迷失自我
迷失自我 2020-11-22 03:38

I have a JSON request which I\'m posting to a HTTP URL.

Should this be treated as 400 where requestedResource field exists but \"Rom

8条回答
  •  爱一瞬间的悲伤
    2020-11-22 04:14

    Think about expectations.

    As a client app, you expect to know if something goes wrong on the server side. If the server needs to throw an error when blah is missing or the requestedResource value is incorrect than a 400 error would be appropriate.

提交回复
热议问题