public class SendGridResponseHandler
extends org.apache.http.impl.client.AbstractResponseHandler<java.lang.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 |
|---|---|
java.lang.String |
handleEntity(org.apache.http.HttpEntity entity) |
java.lang.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 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>handleResponse in class org.apache.http.impl.client.AbstractResponseHandler<java.lang.String>org.apache.http.client.HttpResponseExceptionjava.io.IOExceptionpublic java.lang.String handleEntity(org.apache.http.HttpEntity entity)
throws java.io.IOException
handleEntity in class org.apache.http.impl.client.AbstractResponseHandler<java.lang.String>java.io.IOException