org.apache.http.client.ResponseHandler that returns the response body as a String
for successful (2xx) responses. If the response code was >= 300, the response
body is consumed and an org.apache.http.client.HttpResponseException is thrown.
If this is used with
org.,
HttpClient may handle redirects (3xx responses) internally.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | handleEntity(final HttpEntity entity)
Implements abstract org. |
| public String | handleResponse(final HttpResponse
The response to process response)Overrides org. Implements org. |
| BasicResponseHandler | back to summary |
|---|---|
| public BasicResponseHandler() | |
| handleEntity | back to summary |
|---|---|
| public String handleEntity(final HttpEntity entity) throws IOException Implements abstract org. Returns the entity as a body as a String.
| |
| handleResponse | back to summary |
|---|---|
| public String handleResponse(final HttpResponse response) throws HttpResponseException, IOException Overrides org. Implements org. Doc from org. Read the entity from the response body and pass it to the entity handler
method if the response was successful (a 2xx status code). If no response
body exists, this returns null. If the response was unsuccessful (>= 300
status code), throws an
| |