Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public class CloudHttpException

  1. Object
  2. Throwable
  3. Exception
  4. IOException
  5. 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

status int
the HTTP status, or 0 for a network failure
responseBody String
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