title: android httprequest java.net.UnknownHostException
body: <p>I want to make a http request with android. </p>
  
  <p>is use this:</p>
  
  <pre><code>void testHTTP()
   {
    HttpClient httpClient = new DefaultHttpClient();
  
    HttpUriRequest request = new HttpPost("http://www.google.com");
  
    try {
     HttpResponse response = httpClient.execute(request);
  
     //System.out.println("response protocol version: " + response.getProtocolVersion());
    } catch (ClientProtocolException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    } catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
    }
  
   }
  </code></pre>
  
  <p>I have the internet permission set in my manifest file.</p>
  
  <p>I keep getting <code>java.net.UnknownHostException: www.google.com</code></p>
  
  <p>My final purpose ios to be able to invoke a web service. So, I initially tried the ksoap2 library and the proper url and got the same result.</p>
  
  <p>I suspect I have some bad setting either in my app or in my emulator.</p>
  
  <p>can you give me some pointers on where to look?</p>
  
  <p>it would also bee useful a working example of something similar. then i could check and if the problem persists i would know that is my development setup at fault. </p>
  
  <p>btw, i am using mac snow leopard with eclipse and android 2.2 as a setup</p>
  
  <p>thanks</p>
  
  <p>regards </p>