public class HttpEntityUtil extends Object
HttpResponse
, unzipping it if necessary, and finally consuming the
response.Constructor and Description |
---|
HttpEntityUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getResponseBody(org.apache.http.HttpResponse response)
Extracts the body string using UTF-8 and consumes the
HttpEntity . |
static String |
getResponsePayload(org.apache.http.HttpResponse response)
Deprecated.
Use
getResponseBody(HttpResponse) instead. |
public static String getResponseBody(org.apache.http.HttpResponse response) throws IOException, org.apache.http.ParseException
HttpEntity
.response
- The response to extract the entity from.IOException
- if an error occurred while reading the response.org.apache.http.ParseException
- if the entity of the response could not be parsed.@Deprecated public static String getResponsePayload(org.apache.http.HttpResponse response) throws IOException, org.apache.http.ParseException
getResponseBody(HttpResponse)
instead.IOException
org.apache.http.ParseException
Copyright © 2018 SAP SE. All rights reserved.