Package io.netty.handler.codec.http
Class HttpResponseStatus
java.lang.Object
io.netty.handler.codec.http.HttpResponseStatus
- All Implemented Interfaces:
Comparable<HttpResponseStatus>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpResponseStatus202 Acceptedstatic final HttpResponseStatus502 Bad Gatewaystatic final HttpResponseStatus400 Bad Requeststatic final HttpResponseStatus409 Conflictstatic final HttpResponseStatus100 Continuestatic final HttpResponseStatus201 Createdstatic final HttpResponseStatus103 Early Hints (RFC 8297)static final HttpResponseStatus417 Expectation Failedstatic final HttpResponseStatus424 Failed Dependency (WebDAV, RFC4918)static final HttpResponseStatus403 Forbiddenstatic final HttpResponseStatus302 Foundstatic final HttpResponseStatus504 Gateway Timeoutstatic final HttpResponseStatus410 Gonestatic final HttpResponseStatus505 HTTP Version Not Supportedstatic final HttpResponseStatus507 Insufficient Storage (WebDAV, RFC4918)static final HttpResponseStatus500 Internal Server Errorstatic final HttpResponseStatus411 Length Requiredstatic final HttpResponseStatus423 Locked (WebDAV, RFC4918)static final HttpResponseStatus405 Method Not Allowedstatic final HttpResponseStatus421 Misdirected Requeststatic final HttpResponseStatus301 Moved Permanentlystatic final HttpResponseStatus207 Multi-Status (WebDAV, RFC2518)static final HttpResponseStatus300 Multiple Choicesstatic final HttpResponseStatus511 Network Authentication Required (RFC6585)static final HttpResponseStatus204 No Contentstatic final HttpResponseStatus203 Non-Authoritative Information (since HTTP/1.1)static final HttpResponseStatus406 Not Acceptablestatic final HttpResponseStatus510 Not Extended (RFC2774)static final HttpResponseStatus404 Not Foundstatic final HttpResponseStatus501 Not Implementedstatic final HttpResponseStatus304 Not Modifiedstatic final HttpResponseStatus200 OKstatic final HttpResponseStatus206 Partial Contentstatic final HttpResponseStatus402 Payment Requiredstatic final HttpResponseStatus308 Permanent Redirect (RFC7538)static final HttpResponseStatus412 Precondition Failedstatic final HttpResponseStatus428 Precondition Required (RFC6585)static final HttpResponseStatus102 Processing (WebDAV, RFC2518)static final HttpResponseStatus407 Proxy Authentication Requiredstatic final HttpResponseStatus413 Request Entity Too Largestatic final HttpResponseStatus431 Request Header Fields Too Large (RFC6585)static final HttpResponseStatus408 Request Timeoutstatic final HttpResponseStatus414 Request-URI Too Longstatic final HttpResponseStatus416 Requested Range Not Satisfiablestatic final HttpResponseStatus205 Reset Contentstatic final HttpResponseStatus303 See Other (since HTTP/1.1)static final HttpResponseStatus503 Service Unavailablestatic final HttpResponseStatus101 Switching Protocolsstatic final HttpResponseStatus307 Temporary Redirect (since HTTP/1.1)static final HttpResponseStatus429 Too Many Requests (RFC6585)static final HttpResponseStatus401 Unauthorizedstatic final HttpResponseStatus425 Unordered Collection (WebDAV, RFC3648)static final HttpResponseStatus422 Unprocessable Entity (WebDAV, RFC4918)static final HttpResponseStatus415 Unsupported Media Typestatic final HttpResponseStatus426 Upgrade Required (RFC2817)static final HttpResponseStatus305 Use Proxy (since HTTP/1.1)static final HttpResponseStatus506 Variant Also Negotiates (RFC2295) -
Constructor Summary
ConstructorsConstructorDescriptionHttpResponseStatus(int code, String reasonPhrase) Creates a new instance with the specifiedcodeand itsreasonPhrase. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the code of thisHttpResponseStatus.io.netty.util.AsciiStringReturns the status code asAsciiString.Returns the class of thisHttpResponseStatusintEquality ofHttpResponseStatusonly depends oncode().booleanEquality ofHttpResponseStatusonly depends oncode().inthashCode()static HttpResponseStatusparseLine(io.netty.util.AsciiString line) Parses the specified HTTP status line into aHttpResponseStatus.static HttpResponseStatusparseLine(CharSequence line) Parses the specified HTTP status line into aHttpResponseStatus.static HttpResponseStatusParses the specified HTTP status line into aHttpResponseStatus.Returns the reason phrase of thisHttpResponseStatus.toString()static HttpResponseStatusvalueOf(int code) Returns theHttpResponseStatusrepresented by the specified code.static HttpResponseStatus
-
Field Details
-
CONTINUE
100 Continue -
SWITCHING_PROTOCOLS
101 Switching Protocols -
PROCESSING
102 Processing (WebDAV, RFC2518) -
EARLY_HINTS
103 Early Hints (RFC 8297) -
OK
200 OK -
CREATED
201 Created -
ACCEPTED
202 Accepted -
NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information (since HTTP/1.1) -
NO_CONTENT
204 No Content -
RESET_CONTENT
205 Reset Content -
PARTIAL_CONTENT
206 Partial Content -
MULTI_STATUS
207 Multi-Status (WebDAV, RFC2518) -
MULTIPLE_CHOICES
300 Multiple Choices -
MOVED_PERMANENTLY
301 Moved Permanently -
FOUND
302 Found -
SEE_OTHER
303 See Other (since HTTP/1.1) -
NOT_MODIFIED
304 Not Modified -
USE_PROXY
305 Use Proxy (since HTTP/1.1) -
TEMPORARY_REDIRECT
307 Temporary Redirect (since HTTP/1.1) -
PERMANENT_REDIRECT
308 Permanent Redirect (RFC7538) -
BAD_REQUEST
400 Bad Request -
UNAUTHORIZED
401 Unauthorized -
PAYMENT_REQUIRED
402 Payment Required -
FORBIDDEN
403 Forbidden -
NOT_FOUND
404 Not Found -
METHOD_NOT_ALLOWED
405 Method Not Allowed -
NOT_ACCEPTABLE
406 Not Acceptable -
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required -
REQUEST_TIMEOUT
408 Request Timeout -
CONFLICT
409 Conflict -
GONE
410 Gone -
LENGTH_REQUIRED
411 Length Required -
PRECONDITION_FAILED
412 Precondition Failed -
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large -
REQUEST_URI_TOO_LONG
414 Request-URI Too Long -
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type -
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable -
EXPECTATION_FAILED
417 Expectation Failed -
MISDIRECTED_REQUEST
421 Misdirected Request- See Also:
-
UNPROCESSABLE_ENTITY
422 Unprocessable Entity (WebDAV, RFC4918) -
LOCKED
423 Locked (WebDAV, RFC4918) -
FAILED_DEPENDENCY
424 Failed Dependency (WebDAV, RFC4918) -
UNORDERED_COLLECTION
425 Unordered Collection (WebDAV, RFC3648) -
UPGRADE_REQUIRED
426 Upgrade Required (RFC2817) -
PRECONDITION_REQUIRED
428 Precondition Required (RFC6585) -
TOO_MANY_REQUESTS
429 Too Many Requests (RFC6585) -
REQUEST_HEADER_FIELDS_TOO_LARGE
431 Request Header Fields Too Large (RFC6585) -
INTERNAL_SERVER_ERROR
500 Internal Server Error -
NOT_IMPLEMENTED
501 Not Implemented -
BAD_GATEWAY
502 Bad Gateway -
SERVICE_UNAVAILABLE
503 Service Unavailable -
GATEWAY_TIMEOUT
504 Gateway Timeout -
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported -
VARIANT_ALSO_NEGOTIATES
506 Variant Also Negotiates (RFC2295) -
INSUFFICIENT_STORAGE
507 Insufficient Storage (WebDAV, RFC4918) -
NOT_EXTENDED
510 Not Extended (RFC2774) -
NETWORK_AUTHENTICATION_REQUIRED
511 Network Authentication Required (RFC6585)
-
-
Constructor Details
-
HttpResponseStatus
Creates a new instance with the specifiedcodeand itsreasonPhrase.
-
-
Method Details
-
valueOf
Returns theHttpResponseStatusrepresented by the specified code. If the specified code is a standard HTTP status code, a cached instance will be returned. Otherwise, a new instance will be returned. -
valueOf
Returns theHttpResponseStatusrepresented by the specifiedcodeandreasonPhrase. If the specified code is a standard HTTP statuscodeandreasonPhrase, a cached instance will be returned. Otherwise, a new instance will be returned.- Parameters:
code- The response code value.reasonPhrase- The response code reason phrase.- Returns:
- the
HttpResponseStatusrepresented by the specifiedcodeandreasonPhrase.
-
parseLine
Parses the specified HTTP status line into aHttpResponseStatus. The expected formats of the line are:statusCode(e.g. 200)statusCodereasonPhrase(e.g. 404 Not Found)
- Throws:
IllegalArgumentException- if the specified status line is malformed
-
parseLine
Parses the specified HTTP status line into aHttpResponseStatus. The expected formats of the line are:statusCode(e.g. 200)statusCodereasonPhrase(e.g. 404 Not Found)
- Throws:
IllegalArgumentException- if the specified status line is malformed
-
parseLine
Parses the specified HTTP status line into aHttpResponseStatus. The expected formats of the line are:statusCode(e.g. 200)statusCodereasonPhrase(e.g. 404 Not Found)
- Throws:
IllegalArgumentException- if the specified status line is malformed
-
code
public int code()Returns the code of thisHttpResponseStatus. -
codeAsText
public io.netty.util.AsciiString codeAsText()Returns the status code asAsciiString. -
reasonPhrase
Returns the reason phrase of thisHttpResponseStatus. -
codeClass
Returns the class of thisHttpResponseStatus -
hashCode
public int hashCode() -
equals
Equality ofHttpResponseStatusonly depends oncode(). The reason phrase is not considered for equality. -
compareTo
Equality ofHttpResponseStatusonly depends oncode(). The reason phrase is not considered for equality.- Specified by:
compareToin interfaceComparable<HttpResponseStatus>
-
toString
-