Enum Class Status

java.lang.Object
java.lang.Enum<Status>
org.gnome.soup.Status
All Implemented Interfaces:
Serializable, Comparable<Status>, Constable, Enumeration

@Generated("org.javagi.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.

  • Enum Constant Details

    • NONE

      public static final Status NONE
      No status available. (Eg, the message has not been sent yet)
    • CONTINUE

      public static final Status CONTINUE
      100 Continue (HTTP)
    • SWITCHING_PROTOCOLS

      public static final Status SWITCHING_PROTOCOLS
      101 Switching Protocols (HTTP)
    • PROCESSING

      public static final Status PROCESSING
      102 Processing (WebDAV)
    • OK

      public static final Status OK
      200 Success (HTTP). Also used by many lower-level soup routines to indicate success.
    • CREATED

      public static final Status CREATED
      201 Created (HTTP)
    • ACCEPTED

      public static final Status ACCEPTED
      202 Accepted (HTTP)
    • NON_AUTHORITATIVE

      public static final Status NON_AUTHORITATIVE
      203 Non-Authoritative Information (HTTP)
    • NO_CONTENT

      public static final Status NO_CONTENT
      204 No Content (HTTP)
    • RESET_CONTENT

      public static final Status RESET_CONTENT
      205 Reset Content (HTTP)
    • PARTIAL_CONTENT

      public static final Status PARTIAL_CONTENT
      206 Partial Content (HTTP)
    • MULTI_STATUS

      public static final Status MULTI_STATUS
      207 Multi-Status (WebDAV)
    • MULTIPLE_CHOICES

      public static final Status MULTIPLE_CHOICES
      300 Multiple Choices (HTTP)
    • MOVED_PERMANENTLY

      public static final Status MOVED_PERMANENTLY
      301 Moved Permanently (HTTP)
    • FOUND

      public static final Status FOUND
      302 Found (HTTP)
    • SEE_OTHER

      public static final Status SEE_OTHER
      303 See Other (HTTP)
    • NOT_MODIFIED

      public static final Status NOT_MODIFIED
      304 Not Modified (HTTP)
    • USE_PROXY

      public static final Status USE_PROXY
      305 Use Proxy (HTTP)
    • NOT_APPEARING_IN_THIS_PROTOCOL

      public static final Status NOT_APPEARING_IN_THIS_PROTOCOL

      306

      invalid reference
      Unused
      (HTTP)
    • TEMPORARY_REDIRECT

      public static final Status TEMPORARY_REDIRECT
      307 Temporary Redirect (HTTP)
    • PERMANENT_REDIRECT

      public static final Status PERMANENT_REDIRECT
      308 Permanent Redirect (HTTP)
    • BAD_REQUEST

      public static final Status BAD_REQUEST
      400 Bad Request (HTTP)
    • UNAUTHORIZED

      public static final Status UNAUTHORIZED
      401 Unauthorized (HTTP)
    • PAYMENT_REQUIRED

      public static final Status PAYMENT_REQUIRED
      402 Payment Required (HTTP)
    • FORBIDDEN

      public static final Status FORBIDDEN
      403 Forbidden (HTTP)
    • NOT_FOUND

      public static final Status NOT_FOUND
      404 Not Found (HTTP)
    • METHOD_NOT_ALLOWED

      public static final Status METHOD_NOT_ALLOWED
      405 Method Not Allowed (HTTP)
    • NOT_ACCEPTABLE

      public static final Status NOT_ACCEPTABLE
      406 Not Acceptable (HTTP)
    • PROXY_AUTHENTICATION_REQUIRED

      public static final Status PROXY_AUTHENTICATION_REQUIRED
      407 Proxy Authentication Required (HTTP)
    • REQUEST_TIMEOUT

      public static final Status REQUEST_TIMEOUT
      408 Request Timeout (HTTP)
    • CONFLICT

      public static final Status CONFLICT
      409 Conflict (HTTP)
    • GONE

      public static final Status GONE
      410 Gone (HTTP)
    • LENGTH_REQUIRED

      public static final Status LENGTH_REQUIRED
      411 Length Required (HTTP)
    • PRECONDITION_FAILED

      public static final Status PRECONDITION_FAILED
      412 Precondition Failed (HTTP)
    • REQUEST_ENTITY_TOO_LARGE

      public static final Status REQUEST_ENTITY_TOO_LARGE
      413 Request Entity Too Large (HTTP)
    • REQUEST_URI_TOO_LONG

      public static final Status REQUEST_URI_TOO_LONG
      414 Request-URI Too Long (HTTP)
    • UNSUPPORTED_MEDIA_TYPE

      public static final Status UNSUPPORTED_MEDIA_TYPE
      415 Unsupported Media Type (HTTP)
    • REQUESTED_RANGE_NOT_SATISFIABLE

      public static final Status REQUESTED_RANGE_NOT_SATISFIABLE
      416 Requested Range Not Satisfiable (HTTP)
    • EXPECTATION_FAILED

      public static final Status EXPECTATION_FAILED
      417 Expectation Failed (HTTP)
    • MISDIRECTED_REQUEST

      public static final Status MISDIRECTED_REQUEST
      421 Misdirected Request
    • UNPROCESSABLE_ENTITY

      public static final Status UNPROCESSABLE_ENTITY
      422 Unprocessable Entity (WebDAV)
    • LOCKED

      public static final Status LOCKED
      423 Locked (WebDAV)
    • FAILED_DEPENDENCY

      public static final Status FAILED_DEPENDENCY
      424 Failed Dependency (WebDAV)
    • INTERNAL_SERVER_ERROR

      public static final Status INTERNAL_SERVER_ERROR
      500 Internal Server Error (HTTP)
    • NOT_IMPLEMENTED

      public static final Status NOT_IMPLEMENTED
      501 Not Implemented (HTTP)
    • BAD_GATEWAY

      public static final Status BAD_GATEWAY
      502 Bad Gateway (HTTP)
    • SERVICE_UNAVAILABLE

      public static final Status SERVICE_UNAVAILABLE
      503 Service Unavailable (HTTP)
    • GATEWAY_TIMEOUT

      public static final Status GATEWAY_TIMEOUT
      504 Gateway Timeout (HTTP)
    • HTTP_VERSION_NOT_SUPPORTED

      public static final Status HTTP_VERSION_NOT_SUPPORTED
      505 HTTP Version Not Supported (HTTP)
    • INSUFFICIENT_STORAGE

      public static final Status INSUFFICIENT_STORAGE
      507 Insufficient Storage (WebDAV)
    • NOT_EXTENDED

      public static final Status NOT_EXTENDED
      510 Not Extended (RFC 2774)
  • Field Details

  • Method Details

    • values

      public static Status[] 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

      public static Status valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • of

      public static Status of(int value)
      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 interface Enumeration
      Returns:
      the enum value
    • of

      public static Status of(MemorySegment address)
      Create a new Status for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

      public static @Nullable Type getType()
      Get the GType of the Status class.
      Returns:
      the GType
    • getPhrase

      public static String getPhrase(int statusCode)

      Looks up the stock HTTP description of statusCode.

      There is no reason for you to ever use this function. If you wanted the textual description for the Message:status-code of a given Message, you should just look at the message's Message: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