[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-users
Subject:    Re: HttpMethodBase.getResponseBodyAsString() analog?
From:       Oleg Kalnichevski <olegk () apache ! org>
Date:       2008-01-25 11:12:17
Message-ID: 1201259537.5762.25.camel () ubuntu
[Download RAW message or body]


On Thu, 2008-01-24 at 15:55 -0500, Tim Julien wrote:
> in the new 4.0 stack, is there an analog to 
> org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString()?
> 

Hi Tim,

This should do the trick

HttpEntity entity = response.getEntity();
if (entity != null) {
  String s = EntityUtils.toString(entity);
}

Oleg

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic