Package org.gnome.soup
Enum Class Status
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<Status>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum Status
extends Enum<Status>
implements Enumeration
These represent the known HTTP status code values, plus various
network and internal errors.
Note that no libsoup functions take or return this type directly; any function that works with status codes will accept unrecognized status codes as well.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription202 Accepted (HTTP)502 Bad Gateway (HTTP)400 Bad Request (HTTP)409 Conflict (HTTP)100 Continue (HTTP)201 Created (HTTP)417 Expectation Failed (HTTP)424 Failed Dependency (WebDAV)403 Forbidden (HTTP)302 Found (HTTP)504 Gateway Timeout (HTTP)410 Gone (HTTP)505 HTTP Version Not Supported (HTTP)507 Insufficient Storage (WebDAV)500 Internal Server Error (HTTP)411 Length Required (HTTP)423 Locked (WebDAV)405 Method Not Allowed (HTTP)421 Misdirected Request301 Moved Permanently (HTTP)207 Multi-Status (WebDAV)300 Multiple Choices (HTTP)204 No Content (HTTP)203 Non-Authoritative Information (HTTP)No status available.406 Not Acceptable (HTTP)306 [Unused] (HTTP)510 Not Extended (RFC 2774)404 Not Found (HTTP)501 Not Implemented (HTTP)304 Not Modified (HTTP)200 Success (HTTP).206 Partial Content (HTTP)402 Payment Required (HTTP)308 Permanent Redirect (HTTP)412 Precondition Failed (HTTP)102 Processing (WebDAV)407 Proxy Authentication Required (HTTP)413 Request Entity Too Large (HTTP)408 Request Timeout (HTTP)414 Request-URI Too Long (HTTP)416 Requested Range Not Satisfiable (HTTP)205 Reset Content (HTTP)303 See Other (HTTP)503 Service Unavailable (HTTP)101 Switching Protocols (HTTP)307 Temporary Redirect (HTTP)401 Unauthorized (HTTP)422 Unprocessable Entity (WebDAV)415 Unsupported Media Type (HTTP)305 Use Proxy (HTTP) -
Field Summary
Modifier and TypeFieldDescriptionstatic final Status
shorter alias forREQUESTED_RANGE_NOT_SATISFIABLE
static final Status
302 Moved Temporarily (old name, RFC 2068)static final Status
shorter alias forPROXY_AUTHENTICATION_REQUIRED
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getPhrase
(int statusCode) Looks up the stock HTTP description ofstatusCode
.static Type
getType()
Get the GType of the Status classint
getValue()
Get the numeric value of this enumstatic Status
of
(int value) Create a new Status for the provided valuestatic Status
Returns the enum constant of this class with the specified name.static Status[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
No status available. (Eg, the message has not been sent yet) -
CONTINUE
100 Continue (HTTP) -
SWITCHING_PROTOCOLS
101 Switching Protocols (HTTP) -
PROCESSING
102 Processing (WebDAV) -
OK
200 Success (HTTP). Also used by many lower-level soup routines to indicate success. -
CREATED
201 Created (HTTP) -
ACCEPTED
202 Accepted (HTTP) -
NON_AUTHORITATIVE
203 Non-Authoritative Information (HTTP) -
NO_CONTENT
204 No Content (HTTP) -
RESET_CONTENT
205 Reset Content (HTTP) -
PARTIAL_CONTENT
206 Partial Content (HTTP) -
MULTI_STATUS
207 Multi-Status (WebDAV) -
MULTIPLE_CHOICES
300 Multiple Choices (HTTP) -
MOVED_PERMANENTLY
301 Moved Permanently (HTTP) -
FOUND
302 Found (HTTP) -
SEE_OTHER
303 See Other (HTTP) -
NOT_MODIFIED
304 Not Modified (HTTP) -
USE_PROXY
305 Use Proxy (HTTP) -
NOT_APPEARING_IN_THIS_PROTOCOL
306 [Unused] (HTTP) -
TEMPORARY_REDIRECT
307 Temporary Redirect (HTTP) -
PERMANENT_REDIRECT
308 Permanent Redirect (HTTP) -
BAD_REQUEST
400 Bad Request (HTTP) -
UNAUTHORIZED
401 Unauthorized (HTTP) -
PAYMENT_REQUIRED
402 Payment Required (HTTP) -
FORBIDDEN
403 Forbidden (HTTP) -
NOT_FOUND
404 Not Found (HTTP) -
METHOD_NOT_ALLOWED
405 Method Not Allowed (HTTP) -
NOT_ACCEPTABLE
406 Not Acceptable (HTTP) -
PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required (HTTP) -
REQUEST_TIMEOUT
408 Request Timeout (HTTP) -
CONFLICT
409 Conflict (HTTP) -
GONE
410 Gone (HTTP) -
LENGTH_REQUIRED
411 Length Required (HTTP) -
PRECONDITION_FAILED
412 Precondition Failed (HTTP) -
REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large (HTTP) -
REQUEST_URI_TOO_LONG
414 Request-URI Too Long (HTTP) -
UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type (HTTP) -
REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable (HTTP) -
EXPECTATION_FAILED
417 Expectation Failed (HTTP) -
MISDIRECTED_REQUEST
421 Misdirected Request -
UNPROCESSABLE_ENTITY
422 Unprocessable Entity (WebDAV) -
LOCKED
423 Locked (WebDAV) -
FAILED_DEPENDENCY
424 Failed Dependency (WebDAV) -
INTERNAL_SERVER_ERROR
500 Internal Server Error (HTTP) -
NOT_IMPLEMENTED
501 Not Implemented (HTTP) -
BAD_GATEWAY
502 Bad Gateway (HTTP) -
SERVICE_UNAVAILABLE
503 Service Unavailable (HTTP) -
GATEWAY_TIMEOUT
504 Gateway Timeout (HTTP) -
HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported (HTTP) -
INSUFFICIENT_STORAGE
507 Insufficient Storage (WebDAV) -
NOT_EXTENDED
510 Not Extended (RFC 2774)
-
-
Field Details
-
MOVED_TEMPORARILY
302 Moved Temporarily (old name, RFC 2068) -
PROXY_UNAUTHORIZED
shorter alias forPROXY_AUTHENTICATION_REQUIRED
-
INVALID_RANGE
shorter alias forREQUESTED_RANGE_NOT_SATISFIABLE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
of
Create a new Status for the provided value- Parameters:
value
- the enum value- Returns:
- the enum for the provided value
-
getValue
public int getValue()Get the numeric value of this enum- Specified by:
getValue
in interfaceEnumeration
- Returns:
- the enum value
-
getType
-
getPhrase
Looks up the stock HTTP description ofstatusCode
.*There is no reason for you to ever use this function.* If you wanted the textual description for the
Message:status-code
of a givenMessage
, you should just look at the message'sMessage:reason-phrase
. However, you should only do that for use in debugging messages; HTTP reason phrases are not localized, and are not generally very descriptive anyway, and so they should never be presented to the user directly. Instead, you should create you own error messages based on the status code, and on what you were trying to do.- Parameters:
statusCode
- an HTTP status code- Returns:
- the (terse, English) description of
statusCode
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux
-