Code example for HttpResponse

Methods: getEntity, getFirstHeader, getStatusLine

0
      @Override 
      public String handleResponse(HttpResponse resp) 
        throws org.apache.http.client.HttpResponseException, 
               java.io.IOException { 
 
        if (resp.getStatusLine().getStatusCode() >= 300) return null; 
        FileWatcher.this.lastEtag = resp.getFirstHeader("ETag").getValue(); 
        HttpEntity entity = resp.getEntity(); 
        return entity == null ? null : EntityUtils.toString(entity); 
      } 
    }; 
 
 
    public void pause()  { paused = true; }
    public void resume() { paused = false; }
 
    @Override 
    protected void onPreExecute() {} 
 
    @Override 
    protected String doInBackground(final URI... uris) {