-
public class HttpSpec.StatusCodeStandard HTTP status codes.
-
-
Field Summary
Fields Modifier and Type Field Description private final IntegerOKprivate final IntegerMOVED_PERMANENTLYprivate final IntegerFOUNDprivate final IntegerSEE_OTHERprivate final IntegerTEMPORARY_REDIRECTprivate final IntegerPERMANENT_REDIRECTprivate final IntegerBAD_REQUESTprivate final IntegerUNAUTHORIZEDprivate final IntegerFORBIDDENprivate final IntegerNOT_FOUNDprivate final IntegerMETHOD_NOT_ALLOWEDprivate final IntegerREQUEST_TIMEOUTprivate final IntegerTOO_MANY_REQUESTSprivate final IntegerINTERNAL_ERRORprivate final IntegerBAD_GATEWAYprivate final IntegerSERVICE_UNAVAILABLEprivate final IntegerGATEWAY_TIMEOUTprivate final IntegerNETWORK_AUTHENTICATION_REQUIREDpublic final static HttpSpec.StatusCodeINSTANCE
-
Method Summary
Modifier and Type Method Description final <ERROR CLASS>values()Returns a list of all HTTP status codes. final List<Integer>clientErrors(Integer exclude)Returns a list of HTTP client error status codes (4xx). final <ERROR CLASS>serverErrors()Returns a list of common HTTP server error status codes (5xx). final IntegergetOK()HTTP 200 OK status code. final IntegergetMOVED_PERMANENTLY()HTTP 301 Moved Permanently status code. final IntegergetFOUND()HTTP 302 Found status code. final IntegergetSEE_OTHER()HTTP 303 See Other status code. final IntegergetTEMPORARY_REDIRECT()HTTP 307 Temporary Redirect status code. final IntegergetPERMANENT_REDIRECT()HTTP 308 Permanent Redirect status code. final IntegergetBAD_REQUEST()HTTP 400 Bad Request status code. final IntegergetUNAUTHORIZED()HTTP 401 Unauthorized status code. final IntegergetFORBIDDEN()HTTP 403 Forbidden status code. final IntegergetNOT_FOUND()HTTP 404 Not Found status code. final IntegergetMETHOD_NOT_ALLOWED()HTTP 405 Method Not Allowed status code. final IntegergetREQUEST_TIMEOUT()HTTP 408 Request Timeout status code. final IntegergetTOO_MANY_REQUESTS()HTTP 429 Too Many Requests status code. final IntegergetINTERNAL_ERROR()HTTP 500 Internal Server Error status code. final IntegergetBAD_GATEWAY()HTTP 502 Bad Gateway status code. final IntegergetSERVICE_UNAVAILABLE()HTTP 503 Service Unavailable status code. final IntegergetGATEWAY_TIMEOUT()HTTP 504 Gateway Timeout status code. final IntegergetNETWORK_AUTHENTICATION_REQUIRED()Network Authentication Required (RFC 6585) status code. -
-
Method Detail
-
values
final <ERROR CLASS> values()
Returns a list of all HTTP status codes.
-
clientErrors
final List<Integer> clientErrors(Integer exclude)
Returns a list of HTTP client error status codes (4xx).
- Parameters:
exclude- status codes to exclude from the result
-
serverErrors
final <ERROR CLASS> serverErrors()
Returns a list of common HTTP server error status codes (5xx).
-
getMOVED_PERMANENTLY
final Integer getMOVED_PERMANENTLY()
HTTP 301 Moved Permanently status code.
-
getSEE_OTHER
final Integer getSEE_OTHER()
HTTP 303 See Other status code.
-
getTEMPORARY_REDIRECT
final Integer getTEMPORARY_REDIRECT()
HTTP 307 Temporary Redirect status code.
-
getPERMANENT_REDIRECT
final Integer getPERMANENT_REDIRECT()
HTTP 308 Permanent Redirect status code.
-
getBAD_REQUEST
final Integer getBAD_REQUEST()
HTTP 400 Bad Request status code.
-
getUNAUTHORIZED
final Integer getUNAUTHORIZED()
HTTP 401 Unauthorized status code.
-
getFORBIDDEN
final Integer getFORBIDDEN()
HTTP 403 Forbidden status code.
-
getNOT_FOUND
final Integer getNOT_FOUND()
HTTP 404 Not Found status code.
-
getMETHOD_NOT_ALLOWED
final Integer getMETHOD_NOT_ALLOWED()
HTTP 405 Method Not Allowed status code.
-
getREQUEST_TIMEOUT
final Integer getREQUEST_TIMEOUT()
HTTP 408 Request Timeout status code.
-
getTOO_MANY_REQUESTS
final Integer getTOO_MANY_REQUESTS()
HTTP 429 Too Many Requests status code.
-
getINTERNAL_ERROR
final Integer getINTERNAL_ERROR()
HTTP 500 Internal Server Error status code.
-
getBAD_GATEWAY
final Integer getBAD_GATEWAY()
HTTP 502 Bad Gateway status code.
-
getSERVICE_UNAVAILABLE
final Integer getSERVICE_UNAVAILABLE()
HTTP 503 Service Unavailable status code.
-
getGATEWAY_TIMEOUT
final Integer getGATEWAY_TIMEOUT()
HTTP 504 Gateway Timeout status code.
-
getNETWORK_AUTHENTICATION_REQUIRED
final Integer getNETWORK_AUTHENTICATION_REQUIRED()
Network Authentication Required (RFC 6585) status code.
-
-
-
-