Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class CloudHttpException
- Object
- Throwable
- Exception
- IOException
- CloudHttpException
A failed request to a cloud REST service, with the HTTP status and the
response body the service sent.
Constructors
public CloudHttpException(int status, String responseBody) | Creates the exception. |
Methods
public int getStatus() | The HTTP status, or 0 for a network failure. |
public String getResponseBody() | The response text the service sent with the error. |
Inherited methods
Constructor details
CloudHttpException
public CloudHttpException(int status, String responseBody)Creates the exception.
Parameters
statusint- the HTTP status, or 0 for a network failure
responseBodyString- 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
public String getResponseBody()The response text the service sent with the error.
Returns
the body, never null