title: Apache HTTPClient not processing new line characters
body: <p>I am writing a small app that retrieves some html from a web server based on some variables in the http POST. The HTML data that comes back has a <code>&lt;pre&gt;</code> section in it with some words that are spaced out nicely using newline and tab characters but my app does not receive them. The code is as follows</p>
  
  <pre><code>HttpPost post = new HttpPost("REMOVED FOR PRIVACY");
  
      try {
          // Add your data
          List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;();
              //REMOVED FOR PRIVACY
  
          post.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  
          // Execute HTTP Post Request
          HttpResponse response = httpClient.execute(post, httpContext);
          String htmlBrief = inputStreamToString(response.getEntity().getContent()).toString();
          return htmlBrief;
          }
  </code></pre>
  
  <p>I think it might be how I am reading the response by putting it through a BufferedReader like so </p>
  
  <pre><code>private StringBuilder inputStreamToString(InputStream is) throws IOException {
      int c;
      StringBuilder total = new StringBuilder();
  
      // Wrap a BufferedReader around the InputStream
      BufferedReader rd = new BufferedReader(new InputStreamReader(is));
  
      // Read response until the endIndex
      while ((c = rd.read()) != -1) { 
          total.append((char)c); 
      }
  
      // Return full string
      return total;
  }
  </code></pre>
  
  <p>I thought it might be because I was reading in line by line in the buffered reader so I switched to one character at a time but it didn't help the problem.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks, Ben</p>