2017-09-02 44 views
1

我工作的一個項目,我有發送GET請求 我在使用Android和任何時間Android的使用總是POST請求insted的獲取

HttpURLConnection connection = (HttpURLConnection) myUrl.openConnection(); 

connection.setRequestMethod("GET"); 
connection.setDoOutput(false); 
connection.setRequestProperty("Content-Type", "application/json; charset=UTF-8"); 
connection.setRequestProperty("x-access-token" , token); 
connection.connect(); 

URL連接一個問題,我想送get請求 它只需發送郵件請求是什麼解決方案?

回答