2024年1月15日发(作者:)

Http Status Codehttp响应状态码

Http Status Code/Http response Status Code

100 the Continue

Indicates that the client should continue the request. The

return sent to the client is received and is not rejected by

the server.

The client should continue sending the remaining request data

or the request has been completed, or the data is ignored. The

server must send

The last return is after the request.

101 Switching separate Protocols

The server changes the application protocol for the current

connection, using the Upgrade header information, as requested

by the customer service request. The server will change the

protocol immediately based on the Upgrade header

At the end of the 101 return to the empty line.

Successful

= = = = = = = =

200 OK

The request to the customer service is successfully received,

resolved, and accepted.

201 Created

The request has been completed and a new return resource is

created. The resource created may be a URI resource, which is

typically specified in the Location header. The reply should

contain an entity data

It also contains the resource features and location to select

the appropriate method through the user or the user agent. The

entity data format specifies the content-type header by the

coal type. Initial server

The specified resource must be created before returning the 201

status code. If the behavior is not executed immediately, the

server should return 202.

202 Accepted

The request has been accepted for processing. But the process

is not complete. The request may or may not be executed at all

because the processing may be rejected.

203 Non - Authoritative Information

204 No Content

The server has accepted the request and does not need to return

the entity data, and may need to return the update information.

The return message may contain new or updated information

presented by the entity - headers.

205 Reset the Content

The server has accepted the request and the user agent should

reset the document view.

206 Partial Content

The server has accepted the part of the request to GET the

resource. The request must contain a Range header to indicate

that the access scope may have to contain the if-range header

information to set up the request condition.

Redirection

For example, there are two things in the world

300 Multiple Choices

The request resource conforms to any presentation.

301 version Permanently

The requested resource has been given a new URI.

302 Found

Request a temporary file of the resource through a different

URI.

303 See Other

304 Not Modified

If the customer service has completed a conditional request and

the request is permitted, but the document has not changed, the

server should return 304 status codes. 304

The status code must not contain the information body, which

usually ends with the first blank line after a header field.

305 Use Proxy

The requested resource must be accessed through the agent

(specified by the Location field). The Location resource gives

the proxy's URI.

306 Unused

307 Temporary Redirect

Client Error

= = = = = =

400 Bad Request

Because the wrong syntax causes the server to fail to understand

the request information.

401 Unauthorized

If the request requires user validation. The echo should

contain a www-authenticate header field to specify the

permissions for the requested resource.

402 Payment Required

Keep a status code

403 who

The server accepts the request but is rejected.

404 Not Found

The server has found any resources that match the request-uri.

405 Menthod Not Allowed

The request-line Request is not allowed to pass the specified

URI.

406 Not Acceptable

407 Proxy Authentication Required

408 the request Timeout

The customer service side does not submit any request to the

server for processing time.

Another 409

410 Gone

411 Length Required

The server refuses to accept the request without defining the

content-length field.

412 Precondition Failed

413 Request Entity Too Large

The server refuses to handle requests because the request data

exceeds the scope the server can handle. The server may close

the current connection to prevent the customer service from

continuing the request.

The Request URI - 414 Too Long

The server rejects the current request because the length of

the URI exceeds the server's parsing scope.

415 Unsupported Media Type

The server rejects the current request because the request data

format is not supported by the requested resource.

416 Request Range Not Satisfialbe

417 Expectation Failed

Server Error

= = = = = = = =

500 Internal Server Error

The server encountered an exception that prevented the

execution of the current request

501 Not Implemented

The server does not have the corresponding execution action to

complete the current request.

502 Bad Gateway

503 Service Unavailable

Due to temporary file overload, the server cannot handle the

current request.

504 Gateway Timeout

505 Http Version Not Supported

It's a real thing, and it's not a real thing

/

100 the Continue

101 Switching separate Protocols

102 Processing

200 OK

201 Created

202 Accepted

203 Non - Authoritative Information

204 No Content

205 Reset the Content

206 Partial Content

207 - the Status

226 IM informs the

300 Multiple Choices

301 version Permanently

302 Found

303 See Other

304 Not Modified

305 Use Proxy

306 (Unused)

307 Temporary Redirect

400 Bad Request

401 Unauthorized

402 Payment Required

403 who

404 Not Found

405 Method Not Allowed

406 Not Acceptable

407 Proxy Authentication Required

408 the Request Timeout

Another 409

410 Gone

411 Length Required

412 Precondition Failed

413 Request Entity Too Large

The Request URI - 414 Too Long

415 Unsupported Media Type

416 Requested Range Not Satisfiable

417 Expectation Failed

418 I "m a teapot

422 Unprocessable Entity

423 Locked

424 Failed the Dependency

425 (Unordered Collection)

426 Upgrade Required

500 Internal Server Error

501 Not Implemented

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 the Variant Also Negotiates

507 Insufficient Storage

510 Not Extended

The response value provided by Java HttpURLConnection is

/ * *

* HTTP Status - Code 200: OK.

* /

Public static final int HTTP_OK = 200

/ * *

* HTTP Status - Code 201: Created.

* /

Public static final int HTTP_CREATED = 201

/ * *

* HTTP Status - Code 202: Accepted.

* /

Public static final int HTTP_ACCEPTED = 202;

/ * *

* the HTTP Status Code - 203: the Non - Authoritative

Information.

* /

公共静态final int http_not_权威性= 203;

/ * *

HTTP status - code 204:没有内容。

* /

公共静态final int HTTP_NO_CONTENT = 204;

/ * *

HTTP status - code 205:重置内容。

* /

公共静态final int HTTP_RESET = 205;

/ * *

HTTP状态代码206:部分内容。

* /

公共静态final int http_?= 206;

/ * 3 xx:搬迁/重定向* /

/ * *

* HTTP状态代码300:多个选择。

* /

公共静态final int HTTP_MULT_CHOICE = 300;

/ * *

* HTTP状态代码301:永久移动。

* /

公共静态final int HTTP_MOVED_PERM = 301;

/ * *

HTTP状态代码302:临时重定向。

* /

公共静态final int HTTP_MOVED_TEMP = 302;

/ * *

* HTTP状态代码303:查看其他。

* /

公共静态final int HTTP_SEE_OTHER = 303;

/ * *

* HTTP状态代码304:未修改。

* /

公共静态final int HTTP_NOT_MODIFIED = 304;

/ * *

* HTTP状态代码305:使用代理。

* /

公共静态final int HTTP_USE_PROXY = 305;

客户错误* /

/ * *

* HTTP状态代码400:糟糕的请求。

* /

公共静态final int HTTP_BAD_REQUEST = 400;

/ * *

* HTTP状态码401:未授权。

* /

公共静态final int http_未经授权= 401;

/ * *

* HTTP状态代码402:所需支付。

* /

公共静态final int HTTP_PAYMENT_REQUIRED = 402;

/ * *

* HTTP状态代码403:禁止。

* /

公共静态final int http_禁用= 403;

/ * *

* HTTP状态码404:未找到。

* /

公共静态final int HTTP_NOT_FOUND = 404;

/ * *

* HTTP状态码405:不允许的方法。

* /

公共静态final int HTTP_BAD_METHOD = 405;

/ * *

HTTP状态代码406:不可接受。

* /

公共静态final int http_not_可取= 406;

/ * *

* HTTP状态代码407:所需的代理身份验证。

* /

公共静态final int HTTP_PROXY_AUTH = 407;

/ * *

HTTP状态代码408:请求超时。

* /

公共静态final int HTTP_CLIENT_TIMEOUT = 408;

/ * *

* HTTP状态代码409:冲突。

* /

公共静态final int http_冲突= 409;

/ * *

* HTTP状态代码410:消失。

* /

公共静态final int HTTP_GONE = 410;

/ * *

* HTTP状态码411:所需长度。

* /

公共静态final int HTTP_LENGTH_REQUIRED = 411;

/ * *

HTTP状态代码412:预处理失败。

* /

公共静态final int HTTP_PRECON_FAILED = 412;

/ * *

* HTTP状态代码413:请求实体太大。

* /

公共静态final int http_entity_large = 413;

/ * *

HTTP状态码414:请求- uri太大。

* /

公共静态final int HTTP_REQ_TOO_LONG = 414;

/ * *

* HTTP状态代码415:不支持的媒体类型。

* /

公共静态final int HTTP_UNSUPPORTED_TYPE = 415;

服务器错误* /

/ * *

* HTTP状态码500:内部服务器错误。

@弃用它是错误的,不应该存在。

* /

@Deprecated

公共静态final int HTTP_SERVER_ERROR = 500;

/ * *

* HTTP状态码500:内部服务器错误。

* /

公共静态final int HTTP_INTERNAL_ERROR = 500;

/ * *

* HTTP状态代码501:未实现。

* /

公共静态final int http_not_实现= 501;

/ * *

HTTP状态代码502:坏网关。

* /

公共静态final int HTTP_BAD_GATEWAY = 502;

/ * *

* HTTP status - code 503:服务不可用。

* /

公共静态final int http_无效= 503;

/ * *

* HTTP状态代码504:网关超时。

* /

公共静态final int HTTP_GATEWAY_TIMEOUT = 504;

/ * *

* HTTP状态代码505:不支持HTTP版本。

* /

公共静态final int HTTP_VERSION = 505;