Skip to content

Commit

Permalink
Update NetworkHttpClient.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Jun 24, 2024
1 parent f06548f commit 065b5c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/twilio/http/NetworkHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public <T extends IRequest> Response makeRequest(final T request) {
}

if (method != HttpMethod.GET) {
// TODO: It will be removed after one RC Release.
if (request.getContentType() == null) request.setContentType(EnumConstants.ContentType.FORM_URLENCODED);
if (EnumConstants.ContentType.JSON.getValue().equals(request.getContentType().getValue())) {
HttpEntity entity = new StringEntity(request.getBody(), ContentType.APPLICATION_JSON);
builder.setEntity(entity);
Expand Down

0 comments on commit 065b5c8

Please sign in to comment.