title: How to send HTML as GET-Request parameter?
body: <p>I would like to send a html string with a GET request like this with Apaches HttpClient:</p>
  
  <pre><code>http://sample.com/?html=&lt;html&gt;&lt;head&gt;...
  </code></pre>
  
  <p>This doesnt work at the moment, i think its an encoding problem. Do you have any ideas how to do that?</p>
  
  <pre><code>method.setQueryString(new NameValuePair[] {new NameValuePair("report", "&lt;html&gt;....")});
  client.executeMethod(method)
  </code></pre>
  
  <p>This fails with <code>org.apache.commons.httpclient.NoHttpResponseException: The server localhost failed to respond</code>. If i replace <code>"&lt;html&gt;"</code> by "test.." it works fine.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It seams to be a problem of URL length after encoding, the server doesnt except such long URls. Sending it as POST solves the problem.</p>