Class Constants.StatusCodes

java.lang.Object
io.github.matyrobbrt.curseforgeapi.util.Constants.StatusCodes
Enclosing class:
Constants

public static final class Constants.StatusCodes extends Object
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
    static final int
    The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it.
    static final int
    The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
    static final int
    The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
    static final int
    The 200 (OK) status code indicates that the request has succeeded.
    static final int
    The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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
      The 200 (OK) status code indicates that the request has succeeded.
      See Also:
    • BAD_REQUEST

      public static final int BAD_REQUEST
      The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
      See Also:
    • UNAUTHORIZED

      public static final int UNAUTHORIZED
      The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. The server generating a 401 response MUST send a WWW-Authenticate header field containing at least one challenge applicable to the target resource. If the request included authentication credentials, then the 401 response indicates that authorization has been refused for those credentials. The user agent MAY repeat the request with a new or replaced Authorization header field. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user agent SHOULD present the enclosed representation to the user, since it usually contains relevant diagnostic information.
      See Also:
    • FORBIDDEN

      public static final int FORBIDDEN
      The 403 (Forbidden) status code indicates that the server understood the request but refuses to authorize it. A server that wishes to make public why the request has been forbidden can describe that reason in the response payload (if any). If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials. An origin server that wishes to "hide" the current existence of a forbidden target resource MAY instead respond with a status code of 404 (Not Found).
      See Also:
    • NOT_FOUND

      public static final int NOT_FOUND
      The 404 (Not Found) status code indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
      See Also:
    • INTERNAL_SERVER_ERROR

      public static final int INTERNAL_SERVER_ERROR
      The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
      See Also:
  • Constructor Details

    • StatusCodes

      public StatusCodes()