设置请求的content-type

master
Matthew 10 months ago
parent 0fe5fe5c23
commit 10fd2beae3

@ -271,6 +271,9 @@ public class AppMaster {
httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setConnectTimeout(15000); httpURLConnection.setConnectTimeout(15000);
httpURLConnection.setReadTimeout(15000); httpURLConnection.setReadTimeout(15000);
httpURLConnection.setRequestProperty("Content-Type", "application/json");
try { try {
httpURLConnection.setRequestMethod("POST"); httpURLConnection.setRequestMethod("POST");
} catch (Exception ex) { } catch (Exception ex) {

Loading…
Cancel
Save