org.apache.olingo.commons.api.http

## Enum HttpStatusCode

- java.lang.Object
- - java.lang.Enum<HttpStatusCode>
  - - org.apache.olingo.commons.api.http.HttpStatusCode

- All Implemented Interfaces:
    Serializable, Comparable<HttpStatusCode>

      public enum HttpStatusCode
      extends Enum<HttpStatusCode>

  HTTP status codes as defined in RFC 7231, section 6, and additional status codes as defined in RFC 6585

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ACCEPTED`
    `BAD_GATEWAY`
    `BAD_REQUEST`
    `CONFLICT`
    `CONTINUE`
    `CREATED`
    `EXPECTATION_FAILED`
    `FORBIDDEN`
    `FOUND`
    `GATEWAY_TIMEOUT`
    `GONE`
    `HTTP_VERSION_NOT_SUPPORTED`
    `INTERNAL_SERVER_ERROR`
    `LENGTH_REQUIRED`
    `METHOD_NOT_ALLOWED`
    `MOVED_PERMANENTLY`
    `NO_CONTENT`
    `NOT_ACCEPTABLE`
    `NOT_FOUND`
    `NOT_IMPLEMENTED`
    `NOT_MODIFIED`
    `OK`
    `PARTIAL_CONTENT`
    `PAYLOAD_TOO_LARGE`
    `PAYMENT_REQUIRED`
    `PRECONDITION_FAILED`
    `PRECONDITION_REQUIRED`
    `PROXY_AUTHENTICATION_REQUIRED`
    `RANGE_NOT_SATISFIABLE`
    `REQUEST_TIMEOUT`
    `RESET_CONTENT`
    `SEE_OTHER`
    `SERVICE_UNAVAILABLE`
    `SWITCHING_PROTOCOLS`
    `TEMPORARY_REDIRECT`
    `UNAUTHORIZED`
    `UNSUPPORTED_MEDIA_TYPE`
    `URI_TOO_LONG`
    `USE_PROXY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static HttpStatusCode` | `fromStatusCode(int statusCode)` Converts a numerical status code into the corresponding status enum object.
    `String` | `getInfo()` Gets the status code info.
    `int` | `getStatusCode()` Gets the associated status code.
    `String` | `toString()` The status code info is the readable form of the status code.
    `static HttpStatusCode` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static HttpStatusCode[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CONTINUE

          public static final HttpStatusCode CONTINUE

    - #### SWITCHING_PROTOCOLS

          public static final HttpStatusCode SWITCHING_PROTOCOLS

    - #### OK

          public static final HttpStatusCode OK

    - #### CREATED

          public static final HttpStatusCode CREATED

    - #### ACCEPTED

          public static final HttpStatusCode ACCEPTED

    - #### NO_CONTENT

          public static final HttpStatusCode NO_CONTENT

    - #### RESET_CONTENT

          public static final HttpStatusCode RESET_CONTENT

    - #### PARTIAL_CONTENT

          public static final HttpStatusCode PARTIAL_CONTENT

    - #### MOVED_PERMANENTLY

          public static final HttpStatusCode MOVED_PERMANENTLY

    - #### FOUND

          public static final HttpStatusCode FOUND

    - #### SEE_OTHER

          public static final HttpStatusCode SEE_OTHER

    - #### NOT_MODIFIED

          public static final HttpStatusCode NOT_MODIFIED

    - #### USE_PROXY

          public static final HttpStatusCode USE_PROXY

    - #### TEMPORARY_REDIRECT

          public static final HttpStatusCode TEMPORARY_REDIRECT

    - #### BAD_REQUEST

          public static final HttpStatusCode BAD_REQUEST

    - #### UNAUTHORIZED

          public static final HttpStatusCode UNAUTHORIZED

    - #### PAYMENT_REQUIRED

          public static final HttpStatusCode PAYMENT_REQUIRED

    - #### FORBIDDEN

          public static final HttpStatusCode FORBIDDEN

    - #### NOT_FOUND

          public static final HttpStatusCode NOT_FOUND

    - #### METHOD_NOT_ALLOWED

          public static final HttpStatusCode METHOD_NOT_ALLOWED

    - #### NOT_ACCEPTABLE

          public static final HttpStatusCode NOT_ACCEPTABLE

    - #### PROXY_AUTHENTICATION_REQUIRED

          public static final HttpStatusCode PROXY_AUTHENTICATION_REQUIRED

    - #### REQUEST_TIMEOUT

          public static final HttpStatusCode REQUEST_TIMEOUT

    - #### CONFLICT

          public static final HttpStatusCode CONFLICT

    - #### GONE

          public static final HttpStatusCode GONE

    - #### LENGTH_REQUIRED

          public static final HttpStatusCode LENGTH_REQUIRED

    - #### PRECONDITION_FAILED

          public static final HttpStatusCode PRECONDITION_FAILED

    - #### PAYLOAD_TOO_LARGE

          public static final HttpStatusCode PAYLOAD_TOO_LARGE

    - #### URI_TOO_LONG

          public static final HttpStatusCode URI_TOO_LONG

    - #### UNSUPPORTED_MEDIA_TYPE

          public static final HttpStatusCode UNSUPPORTED_MEDIA_TYPE

    - #### RANGE_NOT_SATISFIABLE

          public static final HttpStatusCode RANGE_NOT_SATISFIABLE

    - #### EXPECTATION_FAILED

          public static final HttpStatusCode EXPECTATION_FAILED

    - #### PRECONDITION_REQUIRED

          public static final HttpStatusCode PRECONDITION_REQUIRED

    - #### INTERNAL_SERVER_ERROR

          public static final HttpStatusCode INTERNAL_SERVER_ERROR

    - #### NOT_IMPLEMENTED

          public static final HttpStatusCode NOT_IMPLEMENTED

    - #### BAD_GATEWAY

          public static final HttpStatusCode BAD_GATEWAY

    - #### SERVICE_UNAVAILABLE

          public static final HttpStatusCode SERVICE_UNAVAILABLE

    - #### GATEWAY_TIMEOUT

          public static final HttpStatusCode GATEWAY_TIMEOUT

    - #### HTTP_VERSION_NOT_SUPPORTED

          public static final HttpStatusCode HTTP_VERSION_NOT_SUPPORTED

  - ### Method Detail

    - #### values

          public static HttpStatusCode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (HttpStatusCode c : HttpStatusCode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static HttpStatusCode valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### fromStatusCode

          public static HttpStatusCode fromStatusCode(int statusCode)

      Converts a numerical status code into the corresponding status enum object.
      Parameters:
        `statusCode` - the numerical status code
      Returns:
        the matching status enum object or null if no matching enum is defined

    - #### getStatusCode

          public int getStatusCode()

      Gets the associated status code.
      Returns:
        the status code.

    - #### getInfo

          public String getInfo()

      Gets the status code info.
      Returns:
        the status code info

    - #### toString

          public String toString()

      The status code info is the readable form of the status code.
      Overrides:
        `toString` in class `Enum<HttpStatusCode>`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.