Web开发中常用的状态码

时间:2023-03-08 15:48:10

在HtttpServletResponse类中有关于状态码的描述。

static int SC_ACCEPTED

Status code (202) indicating that a request was accepted for processing, but was not completed.

状态码(202)表明处理的请求被接受,但未能完成。

static int SC_BAD_GATEWAY

Status code (502) indicating that the HTTP server received an invalid response from a server it consulted when acting as a proxy or gateway.

状态码(502)表明HTTP服务器收到无效的响应从服务器充当代理或网关时参考。

static int SC_BAD_REQUEST

Status code (400) indicating the request sent by the client was syntactically incorrect.

状态码(400)指示客户端发送的请求是语法错误。

static int SC_CONFLICT

Status code (409) indicating that the request could not be completed due to a conflict with the current state of the resource.

状态码(409)表明请求不能完成由于冲突资源的当前状态。

static int SC_CONTINUE

Status code (100) indicating the client can continue.

状态码(100)指示客户端可以继续。

static int SC_CREATED

Status code (201) indicating the request succeeded and created a new resource on the server.

状态码(201)表示请求成功和在服务器上创建了一个新的资源。

static int SC_EXPECTATION_FAILED

Status code (417) indicating that the server could not meet the expectation given in the Expect request header.

状态码(417),表明给出的服务器无法满足期望的期望请求头。

static int SC_FORBIDDEN

Status code (403) indicating the server understood the request but refused to fulfill it.

状态码(403)表明服务器理解的请求,但拒绝履行它。

static int SC_GATEWAY_TIMEOUT

Status code (504) indicating that the server did not receive a timely response from the upstream server while acting as a gateway or proxy.

状态码(504)表明服务器没有收到及时响应从上游服务器作为网关或代理。

static int SC_GONE

Status code (410) indicating that the resource is no longer available at the server and no forwarding address is known.

状态码(410),表明资源不再是可用的服务器,也没有转发地址。

static int SC_HTTP_VERSION_NOT_SUPPORTED

Status code (505) indicating that the server does not support or refuses to support the HTTP protocol version that was used in the request message.

状态码(505)表明服务器不支持或不支持HTTP请求消息中使用的协议版本。

static int SC_INTERNAL_SERVER_ERROR

Status code (500) indicating an error inside the HTTP server which prevented it from fulfilling the request.

状态码(500)表明一个错误在阻止它满足请求的HTTP服务器。

static int SC_LENGTH_REQUIRED

Status code (411) indicating that the request cannot be handled without a defined Content-Length.

状态码(411)表明请求内容长度不能处理没有定义。

static int SC_METHOD_NOT_ALLOWED

Status code (405) indicating that the method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

状态码(405)表明该方法中指定请求行是不允许资源得到由请求uri所指定资源。

static int SC_MOVED_PERMANENTLY

Status code (301) indicating that the resource has permanently moved to a new location, and that future references should use a new URI with their requests.

状态码(301),表明资源已经永久搬到一个新的位置,和未来的引用应该使用一个新的URI的请求。

static int SC_MOVED_TEMPORARILY

Status code (302) indicating that the resource has temporarily moved to another location, but that future references should still use the original URI to access the resource.

状态码(302),表明资源暂时搬到另一个位置,但未来的引用应该仍然使用原来的URI来访问资源。

static int SC_MULTIPLE_CHOICES

Status code (300) indicating that the requested resource corresponds to any one of a set of representations, each with its own specific location.

状态码(300)表明所请求的资源对应的一组表示,每个都有自己的特定位置。

static int SC_NO_CONTENT

Status code (204) indicating that the request succeeded but that there was no new information to return.

状态码(204)表明请求成功了,但是没有新的信息返回。

static int SC_NON_AUTHORITATIVE_INFORMATION

Status code (203) indicating that the meta information presented by the client did not originate from the server.

状态码(203),表明客户端所呈现的元信息不是来自服务器。

static int SC_NOT_ACCEPTABLE

Status code (406) indicating that the resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headerssent in the request.

状态码(406),表明资源被请求只能生成响应实体内容的特征根据接受headerssent不可接受的请求。

static int SC_NOT_FOUND

Status code (404) indicating that the requested resource is not available.

状态码(404)表明所请求的资源不可用。

static int SC_NOT_IMPLEMENTED

Status code (501) indicating the HTTP server does not support the functionality needed to fulfill the request.

状态码(501)指示所需的HTTP服务器不支持的功能满足要求。

static int SC_NOT_MODIFIED

Status code (304) indicating that a conditional GET operation found that the resource was available and not modified.

状态码(304)表明一个条件GET操作发现资源是可用的,而不是修改。

static int SC_OK

Status code (200) indicating the request succeeded normally.

状态码(200)通常表示请求成功。

static int SC_PARTIAL_CONTENT

Status code (206) indicating that the server has fulfilled the partial GET request for the resource.

状态码(206)表明服务器已经完成部分GET请求的资源。

static int SC_PAYMENT_REQUIRED

Status code (402) reserved for future use.

状态码(402)保留以供将来使用。

static int SC_PRECONDITION_FAILED

Status code (412) indicating that the precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.

状态码(412),表明给出的先决条件中的一个或多个请求头字段值为false时在服务器上进行测试。

static int SC_PROXY_AUTHENTICATION_REQUIRED

Status code (407) indicating that the client MUST first authenticate itself with the proxy.

状态码(407)表明客户机必须首先验证本身与代理。

static int SC_REQUEST_ENTITY_TOO_LARGE

Status code (413) indicating that the server is refusing to process the request because the request entity is larger than the server is willing or able to process.

状态码(413)表明服务器拒绝处理请求,因为请求实体大于服务器不愿或不能实现的行为过程。

static int SC_REQUEST_TIMEOUT

Status code (408) indicating that the client did not produce a requestwithin the time that the server was prepared to wait.

static int SC_REQUEST_URI_TOO_LONG

Status code (414) indicating that the server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.

static int SC_REQUESTED_RANGE_NOT_SATISFIABLE

Status code (416) indicating that the server cannot serve the requested byte range.

static int SC_RESET_CONTENT

Status code (205) indicating that the agent SHOULD reset the document view which caused the request to be sent.

static int SC_SEE_OTHER

Status code (303) indicating that the response to the request can be found under a different URI.

static int SC_SERVICE_UNAVAILABLE

Status code (503) indicating that the HTTP server is temporarily overloaded, and unable to handle the request.

static int SC_SWITCHING_PROTOCOLS

Status code (101) indicating the server is switching protocols according to Upgrade header.

static int SC_TEMPORARY_REDIRECT

Status code (307) indicating that the requested resource resides temporarily under a different URI.

static int SC_UNAUTHORIZED

Status code (401) indicating that the request requires HTTP authentication.

static int SC_UNSUPPORTED_MEDIA_TYPE

Status code (415) indicating that the server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.

static int SC_USE_PROXY

Status code (305) indicating that the requested resource MUST be accessed through the proxy given by the Location field.