1 parent 4f273e9 commit ff5bb26Copy full SHA for ff5bb26
1 file changed
src/main/java/com/sendgrid/Client.java
@@ -135,7 +135,9 @@ public Response getResponse(CloseableHttpResponse response) throws IOException {
135
int statusCode = response.getStatusLine().getStatusCode();
136
137
try {
138
- responseBody = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
+ if(response.getEntity() != null) {
139
+ responseBody = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
140
+ }
141
} catch (IOException ex) {
142
throw ex;
143
}
0 commit comments