@Immutable public class BasicResponseHandlerHC4 extends java.lang.Object implements org.apache.http.client.ResponseHandler<java.lang.String>
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 HttpResponseException is thrown.
If this is used with
HttpClient.execute(
org.apache.http.client.methods.HttpUriRequest, ResponseHandler),
HttpClient may handle redirects (3xx responses) internally.| Constructor and Description |
|---|
BasicResponseHandlerHC4() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
handleResponse(org.apache.http.HttpResponse response)
Returns the response body as a String if the response was successful (a
2xx status code).
|
public java.lang.String handleResponse(org.apache.http.HttpResponse response)
throws org.apache.http.client.HttpResponseException,
java.io.IOException
HttpResponseException.handleResponse in interface org.apache.http.client.ResponseHandler<java.lang.String>org.apache.http.client.HttpResponseExceptionjava.io.IOExceptionCopyright © 1999-2015 The Apache Software Foundation. All rights reserved.