Enum HttpStatus

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<HttpStatus>

    public enum HttpStatus
    extends java.lang.Enum<HttpStatus>
    HTTP 응답 상태 상수
    • Enum Constant Detail

      • NO_CONTENT

        public static final HttpStatus NO_CONTENT
      • BAD_REQUEST

        public static final HttpStatus BAD_REQUEST
      • UNAUTHORIZED

        public static final HttpStatus UNAUTHORIZED
      • FORBIDDEN

        public static final HttpStatus FORBIDDEN
      • NOT_FOUND

        public static final HttpStatus NOT_FOUND
      • METHOD_NOT_ALLOWED

        public static final HttpStatus METHOD_NOT_ALLOWED
      • NOT_IMPLEMENTED

        public static final HttpStatus NOT_IMPLEMENTED
      • INTERNAL_SERVER_ERROR

        public static final HttpStatus INTERNAL_SERVER_ERROR
    • Method Detail

      • values

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

        public static HttpStatus valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCode

        public java.lang.String getCode()
      • getMessage

        public java.lang.String getMessage()
      • isError

        public boolean isError()