Enum StatusCode

    • Enum Constant Detail

      • BAD_REQUEST

        public static final StatusCode BAD_REQUEST
        The request cannot be fulfilled due to bad syntax.
      • UNAUTHORIZED

        public static final StatusCode UNAUTHORIZED
        Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided
      • PAYMENT_REQUIRED

        public static final StatusCode PAYMENT_REQUIRED
        Reserved for future use.
      • FORBIDDEN

        public static final StatusCode FORBIDDEN
        The request was a valid request, but the server is refusing to respond to it.
      • NOT_FOUND

        public static final StatusCode NOT_FOUND
        The requested resource could not be found but may be available again in the future
      • METHOD_NOT_ALLOWED

        public static final StatusCode METHOD_NOT_ALLOWED
        A request was made of a resource using a request method not supported by that resource
      • NOT_ACCEPTABLE

        public static final StatusCode NOT_ACCEPTABLE
        The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.
      • PROXY_AUTH_REQUIRED

        public static final StatusCode PROXY_AUTH_REQUIRED
        The client must first authenticate itself with the proxy.
      • REQUEST_TIMEOUT

        public static final StatusCode REQUEST_TIMEOUT
        The server timed out waiting for the request.
      • CONFLICT

        public static final StatusCode CONFLICT
        Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.
      • GONE

        public static final StatusCode GONE
        Indicates that the resource requested is no longer available and will not be available again
      • LENGTH_REQUIRED

        public static final StatusCode LENGTH_REQUIRED
        The request did not specify the length of its content, which is required by the requested resource
      • PRE_CONDITION_FAILED

        public static final StatusCode PRE_CONDITION_FAILED
        The server does not meet one of the preconditions that the requester put on the request
      • REQUEST_ENTITY_TOO_LARGE

        public static final StatusCode REQUEST_ENTITY_TOO_LARGE
        The request is larger than the server is willing or able to process.
      • REQUEST_URI_TOO_LONG

        public static final StatusCode REQUEST_URI_TOO_LONG
        The URI provided was too long for the server to process.
      • UNSUPPORTED_MEDIATYPE

        public static final StatusCode UNSUPPORTED_MEDIATYPE
        The request entity has a media type which the server or resource does not support
      • REQUESTED_RANGE_NOT_SATISFIABLE

        public static final StatusCode REQUESTED_RANGE_NOT_SATISFIABLE
        The client has asked for a portion of the file, but the server cannot supply that portion
      • EXPECTATION_FAILED

        public static final StatusCode EXPECTATION_FAILED
        The server cannot meet the requirements of the Expect request-header field.
      • UNPROCESSABLE_ENTITY

        public static final StatusCode UNPROCESSABLE_ENTITY
        The request was well-formed but was unable to be followed due to semantic errors
      • INTERNAL_SERVER_ERROR

        public static final StatusCode INTERNAL_SERVER_ERROR
        A generic error message, given when no more specific message is suitable.
      • NOT_IMPLEMENTED

        public static final StatusCode NOT_IMPLEMENTED
        The server either does not recognize the request method, or it lacks the ability to fulfill the request
      • BAD_GATEWAY

        public static final StatusCode BAD_GATEWAY
        The server was acting as a gateway or proxy and received an invalid response from the upstream server
      • SERVICE_UNAVAILABLE

        public static final StatusCode SERVICE_UNAVAILABLE
        The server is currently unavailable
      • GATEWAY_TIMEOUT

        public static final StatusCode GATEWAY_TIMEOUT
        The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
      • VERSION_NOT_SUPPORTED

        public static final StatusCode VERSION_NOT_SUPPORTED
        The server does not support the HTTP protocol version used in the request.
      • CODE_UNKNOWN

        public static final StatusCode CODE_UNKNOWN
        Indicates the code we received is not found within this Enum
    • Method Detail

      • values

        public static StatusCode[] 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 (StatusCode c : StatusCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StatusCode 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
      • fromCode

        public static StatusCode fromCode​(int code)
      • getCode

        public int getCode()