Reputation: 6474
I am working with the Apache HTTP Client and trying to extract content from the response...
I have the response in a HTTP Response object named 'response'.
Now, how do I extract the following from the HTTPResponse object??--
(1) Response content as byte[] (2) Content length (3) Mime type (4) Charset
Upvotes: 0
Views: 547
Reputation: 609
HttpEntity entity = response.getEntity();
InputStream instream = entity.getContent();
instream.read();
That's the main codes. You can see the examples in:httpcomponents-client-4.1.3\examples\org\apache\http\examples\client
Upvotes: 1