I would like to send a html string with a GET request like this with Apaches HttpClient:
http://sample.com/?html=<html><head>...
This doesnt work at the moment, i think its an encoding problem. Do you have any ideas how to do that?
method.setQueryString(new NameValuePair[] {new NameValuePair("report", "<html>....")});
client.executeMethod(method)
This fails with org.apache.commons.httpclient.NoHttpResponseException: The server localhost failed to respond
. If i replace "<html>"
by "test.." it works fine.
EDIT
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.