Browse Source

更新get接口

9060 5 months ago
parent
commit
ba23a23128
1 changed files with 24 additions and 4 deletions
  1. 24 4
      src/com/kingdee/eas/custom/beisen/utils/BeisenApiClient.java

+ 24 - 4
src/com/kingdee/eas/custom/beisen/utils/BeisenApiClient.java

@@ -53,16 +53,36 @@ public class BeisenApiClient {
      * @throws IOException
      */
     public JSONObject callApi(String apiUrl, JSONObject requestData) throws IOException {
-        return callApiInternal(apiUrl, requestData, true, "POST");
+        return callApi(apiUrl, requestData, "POST");
     }
     
     public JSONObject callApi(String apiUrl, JSONArray dataArray) throws IOException {
-        return callApiInternal(apiUrl, dataArray, true, "POST");
+        return callApi(apiUrl, dataArray, "POST");
     }
-    
     public JSONObject callPutApi(String apiUrl, JSONObject requestData) throws IOException {
-        return callApiInternal(apiUrl, requestData, true, "PUT");
+        return callApi(apiUrl, requestData, "PUT");
+    }
+    public JSONObject callGetApi(String apiUrl, JSONObject requestData) throws IOException {
+        return callApi(apiUrl, requestData, "GET");
     }
+    public JSONObject callGetApi(String apiUrl, JSONArray dataArray) throws IOException {
+        return callApi(apiUrl, dataArray, "GET");
+    }
+    /**
+     * apiµ÷ÓÃ
+     * @param apiUrl
+     * @param requestData
+     * @return
+     * @throws IOException
+     */
+    public JSONObject callApi(String apiUrl, JSONObject requestData,String method) throws IOException {
+        return callApiInternal(apiUrl, requestData, true, method);
+    }
+
+    public JSONObject callApi(String apiUrl, JSONArray dataArray,String method) throws IOException {
+        return callApiInternal(apiUrl, dataArray, true, method);
+    }
+
 
     // ºËÐÄAPIµ÷ÓÃÂß¼­----------------------------------------------------------