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 16:16:35 GMT
On Fri, Aug 07, 2009 at 09:14:29AM -0700, Adrian Cole wrote:
> It does help that you designed this way... two separate streams add
> unnecessary complexity!
> 

Lots, lots and lots of pain using HttpURLConnection helped.

Cheers

Oleg


> Cheers,
> -Adrian
> jclouds
> 
> On Fri, Aug 7, 2009 at 7:05 AM, Oleg Kalnichevski <olegk@apache.org> wrote:
> 
> > 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
> >
> >

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