posted 23 years ago
Sorry to go all technical, but I'm having real probs. with the Motorola J2ME's HttpConnection code (on a dial-up connection, if that's relevant). I'm writing a program which sends data to be processed by a Web-based CGI script. Basically, my program hangs when the HttpConnection is asked to switch from the Setup stage to the Connected stage - let me explain:
HttpConnection c = (HttpConnection)Connector.open(queryURL);
c.setRequestMethod(HttpConnection.POST);
// Code makes it here.
is = c.openInputStream();
// Code doesn't reach here.
There's no feedback like exceptions to the console, and according to my "Connected To ..." Windows dialog box, no bytes have been sent out by my computer. I'm at a loss - even setting queryURL to something like "http://www.yahoo.com" (and removing the POST command) doesn't work. Is J2ME's HTTP connection code broken? Am I being really stupid? Is there some networking config. file I need to edit or configure?