Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public final class Http

  1. Object
  2. Http
A minimal HTTP/1.1 client over Tcp. Enough to speak a host runtime’s control protocol - the AWS Lambda Runtime API, for instance - without pulling in a platform layer or a TLS stack. Plaintext only: the Lambda Runtime API is plaintext on the loopback interface, and anything facing the public internet terminates TLS in front of the process.

Nested types

class Http.ResponseOne HTTP response: status line, headers and body.

Methods

public static Http.Response get(String host, int port, String path) throws IOException
public static Http.Response post(String host, int port, String path, byte[] body) throws IOException
public static Http.Response request(String host, int port, String method, String path, byte[] body) throws IOException

Inherited methods

Method details

get

public static Http.Response get(String host, int port, String path) throws IOException

post

public static Http.Response post(String host, int port, String path, byte[] body) throws IOException

request

public static Http.Response request(String host, int port, String method, String path, byte[] body) throws IOException