I've managed to make changes to everything but the following:
HttpClient client;
HttpPost method;
client = new DefaultHttpClient();
method = new HttpPost(url);
InputStream rstream;
try {
rstream = method.getResponseBodyAsStream();
} catch (IOException e) {
return BadSpot(e.getMessage());
}
What I'm not sure of is what I should replace getResponseBodyAsStream() with.
InputStream rstream;
try {
HttpResponse response = client.execute(HttpHost, method);
rstream = response.getEntity().getContent();
} catch (IOException e) {
return BadSpot(e.getMessage());
}
above should do what you are asking.
HttpResponse.getEntity(), followed by HttpEntity.getContent()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With