400 和 404 HTTP 错误的区别

Ser*_*hii -1 http http-status-code-404 http-status-code-400

400 和 404 HTTP 错误有什么区别?
你能告诉我一个例子来理解差异吗?

谢谢你。

Vin*_*kar 7

404 代表资源不存在。即调用的 API 不存在或请求页面不存在。但是在 400 的情况下,资源存在但输入错误。

404
http://example.com/pageNotExist.html


400
http://example.com/Api/getCustomer/email@xyz.com
//here email is wrong or not exist
Run Code Online (Sandbox Code Playgroud)