Use these packages:
import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
and open the connection as follows:
String urlString = "http://www.myserver.com/myresource/somethinghere";
HttpConnection httpConnection = (HttpConnection) Connector.open(urlString);
java.io.InputStream inputStream = httpConnection.openInputStream();
user784540
source
share