title: why java.net.UnknownHostException: Host is unresolved: webservername.com:80?
body: <p>I m implementing android app in that I m working on web api. Sometimes my app gets connected to webserver but sometimes it throws exception as <code>java.net.UnknownHostException: Host is unresolved: webservername.com:80.</code> I m fetching json response from api. </p>
  
  <p>I m using fetching code as following:</p>
  
  <pre><code>    String queryResult  =   null;
      HttpClient client = new DefaultHttpClient();
      HttpGet request = new HttpGet();
      try {
              request.setURI(new URI(archiveQuery));
      } catch (URISyntaxException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
      //HttpResponse response = client.execute(request, new BasicResponseHandler());
              try {
                  queryResult =   client.execute(request, new BasicResponseHandler());
              }
              catch (ClientProtocolException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }    
  </code></pre>