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

public interface CloudHttpTransport

Known subtypesConnectionRequestHttpTransport

A binary HTTP transport for the REST clients in com.codename1.cloud: Firebase Storage, Supabase and the Places providers.

The default is ConnectionRequestHttpTransport. Tests install a fake that answers requests synchronously from a queue.

Nested types

interface CloudHttpTransport.HandlerReceives the response of a request.

Methods

public abstract void send(String method, String url, Map<String, String> headers, byte[] body, CloudHttpTransport.Handler handler)Sends one request.

Method details

send

public abstract void send(String method, String url, Map<String, String> headers, byte[] body, CloudHttpTransport.Handler handler)
Sends one request.

Parameters

method String
the HTTP method, GET, POST, PATCH or DELETE
url String
the full URL, query string included
headers Map<String, String>
request headers, may be null
body byte[]
the request body, or null for none
handler CloudHttpTransport.Handler
receives the response on the EDT. Status 0 means a network failure.