hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: How to get error stream ?
Date Fri, 07 Aug 2009 14:05:17 GMT
On Wed, Aug 05, 2009 at 03:40:15PM +0200, Juergen.Zimmermann@HS-Karlsruhe.de wrote:
> Using plain java.net I can use this sequence to obtain an error message
> submitted by the HTTP server:
> HttpURLConnection conn = ...;
> conn.connect();
> InputStream inputStream = conn.getErrorStream();
> 
> How can I get an InputStream representing the error stream when I'm using
> HttpComponents?
> 
> 

HttpCore does not support the concept of an error stream. One should use
HttpEntity#getContent to obtain the response data stream regardless of the HTTP
response status.

Hope this helps

Oleg



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

---------------------------------------------------------------------
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