From 1499de2beb95ade5ed2055661925e891b92c071a Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 7 Aug 2024 15:42:54 +0800 Subject: [PATCH] Refactor --- mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java b/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java index 98fdf309..953945ae 100644 --- a/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java +++ b/mpmaster/src/main/java/com/xypower/mpmaster/AppMaster.java @@ -272,8 +272,6 @@ public class AppMaster { httpURLConnection.setConnectTimeout(15000); httpURLConnection.setReadTimeout(15000); - httpURLConnection.setRequestProperty("Content-Type", "application/json"); - try { httpURLConnection.setRequestMethod("POST"); } catch (Exception ex) { @@ -283,6 +281,7 @@ public class AppMaster { httpURLConnection.setDoInput(true); httpURLConnection.setDoOutput(true); + httpURLConnection.setRequestProperty("Content-Type", "application/json"); httpURLConnection.setRequestProperty("Accept-Cmds", "Multiple"); final boolean shouldSyncTime = mService.shouldSyncTime(); final long requestSyncTime = System.currentTimeMillis();