Class CloudHttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.codename1.cloud.CloudHttpException
A failed request to a cloud REST service, with the HTTP status and the
response body the service sent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe response text the service sent with the error.intThe HTTP status, or 0 for a network failure.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CloudHttpException
Creates the exception.
Parameters
-
status: the HTTP status, or 0 for a network failure -
responseBody: the response text, may be empty
-
-
-
Method Details
-
getStatus
public int getStatus()The HTTP status, or 0 for a network failure.
Returns
the status code
-
getResponseBody
The response text the service sent with the error.
Returns
the body, never null
-