Package org.restheart.utils
Class HttpStatus
java.lang.Object
org.restheart.utils.HttpStatus
Constants enumerating the HTTP status codes. All status codes defined in
RFC1945 (HTTP/1.0, RFC2616 (HTTP/1.1), and RFC2518 (WebDAV) are supported.
SeeStatusLine
- Version:
- $Id: HttpStatus.java 155418 2005-02-26 13:01:52Z dirkv $
- Author:
- Unascribed, Mike Bowler, Jeff Dever
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int<tt>202 Accepted<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>502 Bad Gateway<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>400 Bad Request<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>409 Conflict<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>100 Continue<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>201 Created<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>417 Expectation Failed<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>424 Failed Dependency<tt/> (WebDAV - RFC 2518)static final int<tt>403 Forbidden<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>504 Gateway Timeout<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>410 Gone<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>505 HTTP Version Not Supported<tt/> (HTTP/1.1 - RFC 2616)static final intStatic constant for a 419 error.static final int<tt>507 Insufficient Storage<tt/> (WebDAV - RFC 2518)static final int<tt>500 Server Error<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>411 Length Required<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>423 Locked<tt/> (WebDAV - RFC 2518)static final intStatic constant for a 420 error.static final int<tt>405 Method Not Allowed<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>301 Moved Permanently<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>302 Moved Temporarily<tt/> (Sometimes <tt>Found<tt/>) (HTTP/1.0 - RFC 1945)static final int<tt>207 Multi-Status<tt/> (WebDAV - RFC 2518) or <tt>207 Partial Update OK<tt/> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)static final int<tt>300 Mutliple Choices<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>204 No Content<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>203 Non Authoritative Information<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>406 Not Acceptable<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>404 Not Found<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>501 Not Implemented<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>304 Not Modified<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>200 OK<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>206 Partial Content<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>402 Payment Required<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>412 Precondition Failed<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>102 Processing<tt/> (WebDAV - RFC 2518)static final int<tt>407 Proxy Authentication Required<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>408 Request Timeout<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>413 Request Entity Too Large<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>414 Request-URI Too Long<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>416 Requested Range Not Satisfiable<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>205 Reset Content<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>303 See Other<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>503 Service Unavailable<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>101 Switching Protocols<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>307 Temporary Redirect<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>429 Too Many Requests<tt/> (Additional HTTP Status Codes - RFC 6585)static final int<tt>401 Unauthorized<tt/> (HTTP/1.0 - RFC 1945)static final int<tt>422 Unprocessable Entity<tt/> (WebDAV - RFC 2518)static final int<tt>415 Unsupported Media Type<tt/> (HTTP/1.1 - RFC 2616)static final int<tt>305 Use Proxy<tt/> (HTTP/1.1 - RFC 2616) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetStatusText(int statusCode) Get the reason phrase for a particular status code.
-
Field Details
-
SC_CONTINUE
public static final int SC_CONTINUE<tt>100 Continue<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_SWITCHING_PROTOCOLS
public static final int SC_SWITCHING_PROTOCOLS<tt>101 Switching Protocols<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_PROCESSING
public static final int SC_PROCESSING<tt>102 Processing<tt/> (WebDAV - RFC 2518)- See Also:
-
SC_OK
public static final int SC_OK<tt>200 OK<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_CREATED
public static final int SC_CREATED<tt>201 Created<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_ACCEPTED
public static final int SC_ACCEPTED<tt>202 Accepted<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_NON_AUTHORITATIVE_INFORMATION
public static final int SC_NON_AUTHORITATIVE_INFORMATION<tt>203 Non Authoritative Information<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_NO_CONTENT
public static final int SC_NO_CONTENT<tt>204 No Content<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_RESET_CONTENT
public static final int SC_RESET_CONTENT<tt>205 Reset Content<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_PARTIAL_CONTENT
public static final int SC_PARTIAL_CONTENT<tt>206 Partial Content<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_MULTI_STATUS
public static final int SC_MULTI_STATUS<tt>207 Multi-Status<tt/> (WebDAV - RFC 2518) or <tt>207 Partial Update OK<tt/> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)- See Also:
-
SC_MULTIPLE_CHOICES
public static final int SC_MULTIPLE_CHOICES<tt>300 Mutliple Choices<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_MOVED_PERMANENTLY
public static final int SC_MOVED_PERMANENTLY<tt>301 Moved Permanently<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_MOVED_TEMPORARILY
public static final int SC_MOVED_TEMPORARILY<tt>302 Moved Temporarily<tt/> (Sometimes <tt>Found<tt/>) (HTTP/1.0 - RFC 1945)- See Also:
-
SC_SEE_OTHER
public static final int SC_SEE_OTHER<tt>303 See Other<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_NOT_MODIFIED
public static final int SC_NOT_MODIFIED<tt>304 Not Modified<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_USE_PROXY
public static final int SC_USE_PROXY<tt>305 Use Proxy<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_TEMPORARY_REDIRECT
public static final int SC_TEMPORARY_REDIRECT<tt>307 Temporary Redirect<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_BAD_REQUEST
public static final int SC_BAD_REQUEST<tt>400 Bad Request<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_UNAUTHORIZED
public static final int SC_UNAUTHORIZED<tt>401 Unauthorized<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_PAYMENT_REQUIRED
public static final int SC_PAYMENT_REQUIRED<tt>402 Payment Required<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_FORBIDDEN
public static final int SC_FORBIDDEN<tt>403 Forbidden<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_NOT_FOUND
public static final int SC_NOT_FOUND<tt>404 Not Found<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_METHOD_NOT_ALLOWED
public static final int SC_METHOD_NOT_ALLOWED<tt>405 Method Not Allowed<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_NOT_ACCEPTABLE
public static final int SC_NOT_ACCEPTABLE<tt>406 Not Acceptable<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_PROXY_AUTHENTICATION_REQUIRED
public static final int SC_PROXY_AUTHENTICATION_REQUIRED<tt>407 Proxy Authentication Required<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_REQUEST_TIMEOUT
public static final int SC_REQUEST_TIMEOUT<tt>408 Request Timeout<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_CONFLICT
public static final int SC_CONFLICT<tt>409 Conflict<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_GONE
public static final int SC_GONE<tt>410 Gone<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_LENGTH_REQUIRED
public static final int SC_LENGTH_REQUIRED<tt>411 Length Required<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_PRECONDITION_FAILED
public static final int SC_PRECONDITION_FAILED<tt>412 Precondition Failed<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_REQUEST_TOO_LONG
public static final int SC_REQUEST_TOO_LONG<tt>413 Request Entity Too Large<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_REQUEST_URI_TOO_LONG
public static final int SC_REQUEST_URI_TOO_LONG<tt>414 Request-URI Too Long<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_UNSUPPORTED_MEDIA_TYPE
public static final int SC_UNSUPPORTED_MEDIA_TYPE<tt>415 Unsupported Media Type<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_REQUESTED_RANGE_NOT_SATISFIABLE
public static final int SC_REQUESTED_RANGE_NOT_SATISFIABLE<tt>416 Requested Range Not Satisfiable<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_EXPECTATION_FAILED
public static final int SC_EXPECTATION_FAILED<tt>417 Expectation Failed<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_INSUFFICIENT_SPACE_ON_RESOURCE
public static final int SC_INSUFFICIENT_SPACE_ON_RESOURCEStatic constant for a 419 error. <tt>419 Insufficient Space on Resource<tt/> (WebDAV - draft-ietf-webdav-protocol-05?) or <tt>419 Proxy Reauthentication Required<tt/> (HTTP/1.1 drafts?)- See Also:
-
SC_METHOD_FAILURE
public static final int SC_METHOD_FAILUREStatic constant for a 420 error. <tt>420 Method Failure<tt/> (WebDAV - draft-ietf-webdav-protocol-05?)- See Also:
-
SC_UNPROCESSABLE_ENTITY
public static final int SC_UNPROCESSABLE_ENTITY<tt>422 Unprocessable Entity<tt/> (WebDAV - RFC 2518)- See Also:
-
SC_LOCKED
public static final int SC_LOCKED<tt>423 Locked<tt/> (WebDAV - RFC 2518)- See Also:
-
SC_FAILED_DEPENDENCY
public static final int SC_FAILED_DEPENDENCY<tt>424 Failed Dependency<tt/> (WebDAV - RFC 2518)- See Also:
-
SC_TOO_MANY_REQUESTS
public static final int SC_TOO_MANY_REQUESTS<tt>429 Too Many Requests<tt/> (Additional HTTP Status Codes - RFC 6585)- See Also:
-
SC_INTERNAL_SERVER_ERROR
public static final int SC_INTERNAL_SERVER_ERROR<tt>500 Server Error<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_NOT_IMPLEMENTED
public static final int SC_NOT_IMPLEMENTED<tt>501 Not Implemented<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_BAD_GATEWAY
public static final int SC_BAD_GATEWAY<tt>502 Bad Gateway<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_SERVICE_UNAVAILABLE
public static final int SC_SERVICE_UNAVAILABLE<tt>503 Service Unavailable<tt/> (HTTP/1.0 - RFC 1945)- See Also:
-
SC_GATEWAY_TIMEOUT
public static final int SC_GATEWAY_TIMEOUT<tt>504 Gateway Timeout<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_HTTP_VERSION_NOT_SUPPORTED
public static final int SC_HTTP_VERSION_NOT_SUPPORTED<tt>505 HTTP Version Not Supported<tt/> (HTTP/1.1 - RFC 2616)- See Also:
-
SC_INSUFFICIENT_STORAGE
public static final int SC_INSUFFICIENT_STORAGE<tt>507 Insufficient Storage<tt/> (WebDAV - RFC 2518)- See Also:
-
-
Method Details
-
getStatusText
Get the reason phrase for a particular status code. This method always returns the English text as specified in the relevent RFCs and is not internationalized.- Parameters:
statusCode- the numeric status code- Returns:
- the reason phrase associated with the given status code or null if the status code is not recognized.
-