400和404 HTTP错误之间的区别 [英] The difference between the 400 and 404 HTTP errors

查看:89
本文介绍了400和404 HTTP错误之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

400和404 HTTP错误之间有什么区别?
能给我一个例子来理解它们的区别吗?

What the difference between the 400 and 404 HTTP errors?
Can you show me an example for understand the difference?

谢谢.

推荐答案

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

The 404 represent resource not exist. i.e The called API dose not exist or Request Page dose not exist. But in case 400 the resource exist but input is wrong.

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


400
http://example.com/Api/getCustomer/email@xyz.com
//here email is wrong or not exist

这篇关于400和404 HTTP错误之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆