Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public enum HttpStatus
- Object
- Enum<HttpStatus>
- HttpStatus
ImplementsComparable<HttpStatus>, HttpStatusCode
The common response statuses, so
assertEquals(HttpStatus.OK, response.getStatusCode()) reads as it does in Spring.Enum constants
Methods
Inherited methods
Enum constant details
CONTINUE
CONTINUESWITCHING_PROTOCOLS
SWITCHING_PROTOCOLSOK
OKCREATED
CREATEDACCEPTED
ACCEPTEDNO_CONTENT
NO_CONTENTPARTIAL_CONTENT
PARTIAL_CONTENTMOVED_PERMANENTLY
MOVED_PERMANENTLYFOUND
FOUNDSEE_OTHER
SEE_OTHERNOT_MODIFIED
NOT_MODIFIEDTEMPORARY_REDIRECT
TEMPORARY_REDIRECTPERMANENT_REDIRECT
PERMANENT_REDIRECTBAD_REQUEST
BAD_REQUESTUNAUTHORIZED
UNAUTHORIZEDFORBIDDEN
FORBIDDENNOT_FOUND
NOT_FOUNDMETHOD_NOT_ALLOWED
METHOD_NOT_ALLOWEDNOT_ACCEPTABLE
NOT_ACCEPTABLEREQUEST_TIMEOUT
REQUEST_TIMEOUTCONFLICT
CONFLICTGONE
GONELENGTH_REQUIRED
LENGTH_REQUIREDPRECONDITION_FAILED
PRECONDITION_FAILEDPAYLOAD_TOO_LARGE
PAYLOAD_TOO_LARGEUNSUPPORTED_MEDIA_TYPE
UNSUPPORTED_MEDIA_TYPEREQUESTED_RANGE_NOT_SATISFIABLE
REQUESTED_RANGE_NOT_SATISFIABLEEXPECTATION_FAILED
EXPECTATION_FAILEDUNPROCESSABLE_ENTITY
UNPROCESSABLE_ENTITYTOO_MANY_REQUESTS
TOO_MANY_REQUESTSREQUEST_HEADER_FIELDS_TOO_LARGE
REQUEST_HEADER_FIELDS_TOO_LARGEINTERNAL_SERVER_ERROR
INTERNAL_SERVER_ERRORNOT_IMPLEMENTED
NOT_IMPLEMENTEDBAD_GATEWAY
BAD_GATEWAYSERVICE_UNAVAILABLE
SERVICE_UNAVAILABLEGATEWAY_TIMEOUT
GATEWAY_TIMEOUTHTTP_VERSION_NOT_SUPPORTED
HTTP_VERSION_NOT_SUPPORTEDMethod details
values
public static HttpStatus[] values()valueOf
public static HttpStatus valueOf(String name)value
public int value()The numeric code.
is1xxInformational
public boolean is1xxInformational()is2xxSuccessful
public boolean is2xxSuccessful()is3xxRedirection
public boolean is3xxRedirection()is4xxClientError
public boolean is4xxClientError()is5xxServerError
public boolean is5xxServerError()isError
public boolean isError()A 4xx or a 5xx.
resolve
public static HttpStatus resolve(int code)The constant for
code, or null when there is none.valueOf
public static HttpStatus valueOf(int code)The constant for
code; IllegalArgumentException when there is none.