Home | Русский

How to Send an HTTP POST and GET Requests

As you might imagine, sending an HTTP POST request is a very similar process to sending a GET request.
See example.

public void httpRequest(){
Connect.getInstance().setParam(”all”, “getall”));
Connect.getInstance().setParam(”sessionid”, “64654sdf465sadf4″);
Connect.getInstance().doPost(”http://freesrc.com/”);
while (Connect.getInstance().isActive()) {
Thread.sleep(20);
}
[...]

Posted in: J2ME by admin No Comments , , ,