//Reading the content to the buffered.
//contentObtained = false: Content does not get yet.
//contentObtained = true: Content is buffered by BufferedHttpEntity.
if (entity != null && entity.isStreaming()) {
try {
entity = new BufferedHttpEntity(entity);
//important to setEntity return to Response. If don't assign again, next to get
//, you can not get the response content
response.setEntity(entity);
} catch (IOException ioex) {
throw new SocialHttpClientException(ioex.toString(), ioex);