hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tarini <tarin...@gmail.com>
Subject reading body of error-500 response
Date Sat, 27 Mar 2010 18:47:39 GMT

Hi guys,
I'm debugging a web applications that returns a 500 error code response
(with errors explanation in its body) if some parameters are missing.
How can I read its body? 
I get an empty HttpEntity -.-

I tried different way but the results are always the same

here my list try:

public class MyResponseHandler implements ResponseHandler<String> {

	@Override
	public String handleResponse(HttpResponse response) throws
ClientProtocolException,
			IOException {
		HttpEntity e = response.getEntity();
		return EntityUtils.toString(e);
	}

}

thanks :)
-- 
View this message in context: http://old.nabble.com/reading-body-of-error-500-response-tp28054394p28054394.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message