Open runzhq opened 6 years ago
200 OK 客户端发出的请求被浏览器正确处理了。
204 No content 请求成功了,但是响应报文不包含实体的主体,常常用于只需要客户端向服务器发送内容,而服务器不需要向客户端发送内容。
205 Reset Content 与204 响应不同在于要求请求方重置内容。
206 Partial Content 客户端进行了范围请求,响应报文中包含由Content-Range指定范围的实体内容。
301 Moved Permanently永久重定向,表示浏览器请求的资源被重新分配了新的URI,如果之前的URI被保存到书签中,那么应该根据Location更改新的URI。
302 Found 临时重定向。表示浏览器请求的资源临时被放到了另外一个URI中,希望本次可以访问新的URI,与301的区别是如果加入到书签中则不需要按照新的URI更新书签。
303 See Other 与302含义类似。主要区别是应该使用GET方法重新获取资源。其实,301,302的标准均规定不能将POST变为GET,但是没有遵守。
304 Not Modified。当浏览器发出一个附带条件的请求时,如果没有找到符合条件的资源时返回304(不包含响应的主体部分),表示浏览器使用服务器端未过期缓存。
307 Temporary Redirect临时重定向。与302含义相同,但是不会将POST变为GET。
2XX成功
200 OK 客户端发出的请求被浏览器正确处理了。
204 No content 请求成功了,但是响应报文不包含实体的主体,常常用于只需要客户端向服务器发送内容,而服务器不需要向客户端发送内容。
205 Reset Content 与204 响应不同在于要求请求方重置内容。
206 Partial Content 客户端进行了范围请求,响应报文中包含由Content-Range指定范围的实体内容。
3XX重定向
301 Moved Permanently永久重定向,表示浏览器请求的资源被重新分配了新的URI,如果之前的URI被保存到书签中,那么应该根据Location更改新的URI。
302 Found 临时重定向。表示浏览器请求的资源临时被放到了另外一个URI中,希望本次可以访问新的URI,与301的区别是如果加入到书签中则不需要按照新的URI更新书签。
303 See Other 与302含义类似。主要区别是应该使用GET方法重新获取资源。其实,301,302的标准均规定不能将POST变为GET,但是没有遵守。
304 Not Modified。当浏览器发出一个附带条件的请求时,如果没有找到符合条件的资源时返回304(不包含响应的主体部分),表示浏览器使用服务器端未过期缓存。
307 Temporary Redirect临时重定向。与302含义相同,但是不会将POST变为GET。