当前位置:网站首页>服务器响应状态码
服务器响应状态码
2022-07-02 22:01:00 【JJpZh】
一、状态码大类
| 状态码分类 | 说明 |
|---|---|
| 1xx | 响应中——临时状态码,表示请求已经接受,告诉客户端应该继续请求或者如果它已经完成则忽略它 |
| 2xx | 成功——表示请求已经被成功接收,处理已完成 |
| 3xx | 重定向——重定向到其它地方:它让客户端再发起一个请求以完成整个处理。 |
| 4xx | 客户端错误——处理发生错误,责任在客户端,如:客户端的请求一个不存在的资源,客户端未被授权,禁止访问等 |
| 5xx | 服务器端错误——处理发生错误,责任在服务端,如:服务端抛出异常,路由出错,HTTP版本不支持等 |
二、常见的响应状态码
| 状态码 | 英文描述 | 解释 |
|---|---|---|
| 200 | OK | 客户端请求成功,即处理成功,这是我们最想看到的状态码 |
| 302 | Found | 指示所请求的资源已移动到由Location响应头给定的 URL,浏览器会自动重新访问到这个页面 |
| 304 | Not Modified | 告诉客户端,你请求的资源至上次取得后,服务端并未更改,你直接用你本地缓存吧。隐式重定向 |
| 400 | Bad Request | 客户端请求有语法错误,不能被服务器所理解 |
| 403 | Forbidden | 服务器收到请求,但是拒绝提供服务,比如:没有权限访问相关资源 |
| 404 | Not Found | 请求资源不存在,一般是URL输入有误,或者网站资源被删除了 |
| 428 | Precondition Required | 服务器要求有条件的请求,告诉客户端要想访问该资源,必须携带特定的请求头 |
| 429 | Too Many Requests | 太多请求,可以限制客户端请求某个资源的数量,配合 Retry-After(多长时间后可以请求)响应头一起使用 |
| 431 | Request Header Fields Too Large | 请求头太大,服务器不愿意处理请求,因为它的头部字段太大。请求可以在减少请求头域的大小后重新提交。 |
| 405 | Method Not Allowed | 请求方式有误,比如应该用GET请求方式的资源,用了POST |
| 500 | Internal Server Error | 服务器发生不可预期的错误。服务器出异常了,赶紧看日志去吧 |
| 503 | Service Unavailable | 服务器尚未准备好处理请求,服务器刚刚启动,还未初始化好 |
| 511 | Network Authentication Required | 客户端需要进行身份验证才能获得网络访问权限 |
边栏推荐
- [shutter] shutter page life cycle (initialization period | createstate | initstate | update period | build | destroy period | dispose)
- [001] [arm-cortex-m3/4] internal register
- TinyMCE visual editor adds Baidu map plug-in
- Regular expression (2)
- [leetcode] sword finger offer 04 Search in two-dimensional array
- Ransack组合条件搜索实现
- Evolution of messaging and streaming systems under the native tide of open source cloud
- Market Research - current situation and future development trend of anterior cruciate ligament (ACL) reconstruction Market
- SQL必需掌握的100个重要知识点:使用游标
- 20220702 how do programmers build knowledge systems?
猜你喜欢

Technical solution of vision and manipulator calibration system

20220702 how do programmers build knowledge systems?

It's not easy to say I love you | use the minimum web API to upload files (swagger support) # yyds dry inventory #

Introduction to victoriametrics

"New programmer 003" was officially launched, and the cloud native and digital practical experience of 30+ companies such as Huawei and Alibaba

A specially designed loss is used to deal with data sets with unbalanced categories

C语言,实现三子棋小游戏

#include<>和#include“”的区别

Ransack combined condition search implementation

TinyMCE visual editor adds Baidu map plug-in
随机推荐
100 important knowledge points that SQL must master: using cursors
Using emqx cloud to realize one machine one secret verification of IOT devices
scrcpy这款软件解决了和同事分享手机屏幕的问题| 社区征文
基于ASP.net的手机销售管理系统(二手手机销售管理系统)+ASP.NET+C#语言+VS2010+数据库可以用于课设、毕设学习
kubernetes资源对象介绍及常用命令(四)
Market Research - current situation and future development trend of environmental friendly fireworks Market
Meibeer company is called "Manhattan Project", and its product name is related to the atomic bomb, which has caused dissatisfaction among Japanese netizens
From "bronze" to "King", there are three secrets of enterprise digitalization
数据库系统概论第一章简答题-期末考得怎么样?
Technical solution of vision and manipulator calibration system
An overview of the development of affective computing and understanding research
Sql service intercepts string
Infrastructure is code: a change is coming
[C question set] of V
【C 题集】of Ⅴ
Unity3D学习笔记4——创建Mesh高级接口
一周生活
Pointer array parameter passing, pointer parameter passing
【leetcode】1380. Lucky number in matrix
Market Research - current market situation and future development trend of total nutrition products