Problem using HTTPClient

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Problem using HTTPClient

Postby kameltreiber84 » Fri Feb 26, 2010 3:52 pm

Hi there.
I am a little bit confused about the apache HttpClient.

If I do this in a non android Java project everything works fine.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. HttpClient client = new HttpClient();
  2.                 GetMethod get = new GetMethod("https://statse.webtrendslive.com/dcswke6he4h7cnypl8ux5tayd_5q7j/wtid.js");
  3.                 try {
  4.                         client.executeMethod(get);
  5.                 } catch (Exception e) {
  6.                         e.printStackTrace();
  7.                 }
Parsed in 0.011 seconds, using GeSHi 1.0.8.4



If i do this in an android project i get Exceptions:
Code: Select all
WARN/System.err(666): java.net.UnknownHostException: statse.webtrendslive.com
at java.net.InetAddress.lookupHostByName(InetAddress.java:512)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:269)
(...)


Whats going wrong here?

Thanks and regards.
kameltreiber84
Junior Developer
Junior Developer
 
Posts: 18
Joined: Tue Jan 26, 2010 10:24 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 3 guests