|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.client.BasicResponseHandler
@Immutable public class BasicResponseHandler
A 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 Summary | |
|---|---|
BasicResponseHandler()
|
|
| Method Summary | |
|---|---|
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). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicResponseHandler()
| Method Detail |
|---|
public java.lang.String handleResponse(org.apache.http.HttpResponse response)
throws HttpResponseException,
java.io.IOException
HttpResponseException.
handleResponse in interface ResponseHandler<java.lang.String>response - The response to process
ClientProtocolException - in case of an http protocol error
java.io.IOException - in case of a problem or the connection was aborted
HttpResponseException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||