Skip to content

Commit 56d8bd0

Browse files
authored
fix: Content-type for empty body Post request (#187)
1 parent d04fa4e commit 56d8bd0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/com/crowdin/client/core/http/impl/http/ApacheHttpClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ private <V> HttpUriRequest buildRequest(String httpMethod, String url, V data, H
151151
entity = new StringEntity(this.jsonTransformer.convert(data), ContentType.APPLICATION_JSON);
152152
}
153153
requestBuilder.setEntity(entity);
154+
} else if (HttpPost.METHOD_NAME.equals(httpMethod)) {
155+
requestBuilder.setEntity(new StringEntity("", ContentType.APPLICATION_JSON));
154156
}
155157
Map<String, Object> headers = new HashMap<>();
156158
headers.putAll(config.getHeaders());

0 commit comments

Comments
 (0)