public class SendGridResponseHandler extends org.apache.http.impl.client.AbstractResponseHandler<String>
ResponseHandler that returns the response body as a String
for all responses.
If this is used with
HttpClient.execute(
org.apache.http.client.methods.HttpUriRequest, org.apache.http.client.ResponseHandler),
HttpClient may handle redirects (3xx responses) internally.
| Constructor and Description |
|---|
SendGridResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
String |
handleEntity(org.apache.http.HttpEntity entity) |
String |
handleResponse(org.apache.http.HttpResponse response)
Read the entity from the response body and pass it to the entity handler
method if the response was successful (a 2xx status code).
|
public String handleResponse(org.apache.http.HttpResponse response) throws org.apache.http.client.HttpResponseException, IOException
HttpResponseException.handleResponse in interface org.apache.http.client.ResponseHandler<String>handleResponse in class org.apache.http.impl.client.AbstractResponseHandler<String>org.apache.http.client.HttpResponseExceptionIOExceptionpublic String handleEntity(org.apache.http.HttpEntity entity) throws IOException
handleEntity in class org.apache.http.impl.client.AbstractResponseHandler<String>IOExceptionCopyright © 2020. All rights reserved.