Class BasicHttpClientResponseHandler

java.lang.Object
org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler<String>
org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler
All Implemented Interfaces:
org.apache.hc.core5.http.io.HttpClientResponseHandler<String>

@Contract(threading=STATELESS) public class BasicHttpClientResponseHandler extends AbstractHttpClientResponseHandler<String>
A HttpClientResponseHandler 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.hc.core5.http.ClassicHttpRequest, org.apache.hc.core5.http.io.HttpClientResponseHandler), HttpClient may handle redirects (3xx responses) internally.

Since:
4.0