java status_java状态代码(Java status code).doc

HTTP响应通常由状态行、响应头、空行和内容文档组成。状态行包含HTTP版本、状态码及对应描述。2XX表示成功,如200-OK。1XX为临时响应,3XX表示重定向,4XX和5XX表示客户端或服务器错误。例如,404表示请求资源未找到,500表示服务器内部错误。状态码帮助诊断请求失败原因。

java状态代码(Java status code).doc

java状态代码(Java status code)Nine point seven

When a Web server responds to a request from a browser or other client program, its response is generally composed of the following parts: a state line, several response heads, a blank line, and a content document. Here's one of the easiest responses:

The status line contains the HTTP version, the status code, and the short description information corresponding to the status code. In most cases, all response heads except Content-Type are optional. But Content-Type is required, and it describes the MIME type of the following document. Although most replies contain a document, some do not include, for example, the response to the HEAD request will never be attached to the document. There are many state codes that are actually used to identify a failed request that does not contain a document (or only a brief error message).

When a user attempts to access a content on a server running Internet information service (IIS) over HTTP, IIS returns a numeric code that represents the state of the request. The status code can indicate whether the request is successful or not, and also reveals the exact reason for the failure of the request.

1XX - information tips

These state codes represent temporary responses. The client should be ready to receive one or more 1XX responses before receiving the regular response.

The initial request of 100 - Continue has been accepted, and the client should continue to send the rest of the request. (HTTP 1.1 new)

101 - Switching Protocols server will be converted to another protocol according to client's request (HTTP 1.1 new)

2XX - success

This type of state code indicates that the server successfully accepts the client request.

200 - OK is normal, followed by replies to requests for GET and POST documents.

The 201 - Created server has created the document, and the Location header gives its URL.

202 - Accepted has accepted the request, but the processing has not yet been completed.

The 203 - Non-Autho

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值