From 961b0f71e112ac40905aeef875b756f6c4d98407 Mon Sep 17 00:00:00 2001 From: Ryan Griffith Date: Thu, 23 Apr 2020 12:01:02 -0400 Subject: [PATCH] feat: Set Content-Type request header to application/json --- src/com/hannonhill/umt/service/RestApi.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/hannonhill/umt/service/RestApi.java b/src/com/hannonhill/umt/service/RestApi.java index 71ff0ef..c3d1db5 100644 --- a/src/com/hannonhill/umt/service/RestApi.java +++ b/src/com/hannonhill/umt/service/RestApi.java @@ -442,6 +442,7 @@ private static JsonObject performApiRequest(String username, String password, St HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setDoOutput(true); con.setRequestMethod("POST"); + con.setRequestProperty("Content-Type", "application/json; utf-8"); JsonObject authentication = new JsonObject(); authentication.addProperty("username", username);