Skip to content

Commit

Permalink
Add Content-Type header and set to application/json by default. (mlfl…
Browse files Browse the repository at this point in the history
  • Loading branch information
akarloff authored and aarondav committed May 31, 2019
1 parent 8dd5770 commit e27cbaf
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ String post(String path, String json) {
HttpPost request = new HttpPost();
fillRequestSettings(request, path);
request.setEntity(new StringEntity(json, StandardCharsets.UTF_8));
request.setHeader("Content-Type", "application/json");
try {
HttpResponse response = httpClient.execute(request);
checkError(response);
Expand Down

0 comments on commit e27cbaf

Please sign in to comment.