title: getting the response body of HttpResponse
body: <p>I have done this:</p>
  
  <pre><code>response = httpclient.execute(targetHost, httppost); 
      if(response.getStatusLine().getStatusCode() == 200)
                          {
      HttpEntity entity = response.getEntity();
      System.out.println("Entity:"+entity);
    if (entity != null) 
                              {
          String responseBody = EntityUtils.toString(entity);
          System.out.println("finalResult"+responseBody.toString());
                              }
  </code></pre>
  
  <p>The thing about it is that the first <code>println()</code> displays this: <code>org.apache.http.conn.BasicManagedEntity@481e8150</code> which is good.</p>
  
  <p>But the second <code>System.out.println("finalResult"+responseBody.toString());</code> displays only this <code>finalResult</code>. So what is wrong with this:</p>
  
  <pre><code>String responseBody = EntityUtils.toString(entity);
              System.out.println("finalResult"+responseBody.toString());
  </code></pre>
  
  <p>???</p>
  
  <p><strong>IMPORTANT</strong> This <code>HttpEntity entity = response.getEntity();</code> is equal to <code>org.apache.http.conn.BasicManagedEntity@481e8150</code>. SO the problem must be here: </p>
  
  <p>String responseBody = EntityUtils.toString(entity);.</p>
  
  <p>Please help!!!</p>