HttpConnection c = null; InputStream is = null; OutputStream os = null; try { c = (HttpConnection)Connector.open(url);
// Set the request method and headers c.setRequestMethod(HttpConnection.POST)
// Getting the output stream may flush the headers os = c.openOutputStream(); os.write("LIST games\n".getBytes()); os.flush(); // Optional, getResponseCode will flush