import javax.microedition.lcdui.*; import javax.microedition.midlet.*; import javax.microedition.io.*; import java.io.*; ///////////// try{ HttpConnection connection = (HttpConnection) Connector.open("http://somenonexistentsite"); connection.setRequestMethod(HttpConnection.GET); connection.setRequestProperty("Content-Type","//text plain"); connection.setRequestProperty("Connection", "close"); textBox.setString("ok"); // <=== when started On PC } catch(IOException e) { textBox.setString("unable to open url");//<<== ...on Mobile Phone }
HttpConnection()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)