Class Response.Code

java.lang.Object
org.attribyte.api.http.Response.Code
Enclosing class:
Response

public static class Response.Code extends Object
Common HTTP response codes.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Request was accepted (202).
    static final int
    Request problem (400).
    static final int
    Access to resource is forbidden (403).
    static final int
    No content (204).
    static final int
    Resource was not found (404).
    static final int
    Successful (200).
    static final int
    Server produced an error (500).
    static final int
    Server is unavailable (503).
    static final int
    Request requires authorization (401).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final boolean
    isOK(int code)
    Determines if a response code is "OK".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OK

      public static final int OK
      Successful (200).
      See Also:
    • ACCEPTED

      public static final int ACCEPTED
      Request was accepted (202).
      See Also:
    • NO_CONTENT

      public static final int NO_CONTENT
      No content (204).
      See Also:
    • BAD_REQUEST

      public static final int BAD_REQUEST
      Request problem (400).
      See Also:
    • UNAUTHORIZED

      public static final int UNAUTHORIZED
      Request requires authorization (401).
      See Also:
    • FORBIDDEN

      public static final int FORBIDDEN
      Access to resource is forbidden (403).
      See Also:
    • NOT_FOUND

      public static final int NOT_FOUND
      Resource was not found (404).
      See Also:
    • SERVER_ERROR

      public static final int SERVER_ERROR
      Server produced an error (500).
      See Also:
    • SERVER_UNAVAILABLE

      public static final int SERVER_UNAVAILABLE
      Server is unavailable (503).
      See Also:
  • Constructor Details

    • Code

      public Code()
  • Method Details

    • isOK

      public static final boolean isOK(int code)
      Determines if a response code is "OK".
      Parameters:
      code - The response code.
      Returns:
      Is it "OK"?