Class RestAPI

java.lang.Object
com.chatopera.bot.sdk.basics.RestAPI

public class RestAPI extends Object
RestAPI接口
  • Constructor Details

    • RestAPI

      public RestAPI()
  • Method Details

    • post

      public static org.json.JSONObject post(String url, org.json.JSONObject body, HashMap<String,Object> query, HashMap<String,String> headers) throws kong.unirest.UnirestException
      Post
      Parameters:
      url -
      body -
      query -
      headers -
      Returns:
      Throws:
      kong.unirest.UnirestException
    • post

      public static org.json.JSONObject post(String url, org.json.JSONObject body) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • get

      public static org.json.JSONObject get(String url, HashMap<String,Object> query, HashMap<String,String> headers) throws kong.unirest.UnirestException
      Get
      Parameters:
      url -
      query -
      headers -
      Returns:
      Throws:
      kong.unirest.UnirestException
    • get

      public static org.json.JSONObject get(String url) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • get

      public static org.json.JSONObject get(String url, HashMap<String,Object> query) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • delete

      public static org.json.JSONObject delete(String url, HashMap<String,String> headers) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • delete

      public static org.json.JSONObject delete(String url, HashMap<String,String> headers, org.json.JSONObject body) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • put

      public static org.json.JSONObject put(String url, HashMap<String,Object> body, HashMap<String,String> headers) throws kong.unirest.UnirestException
      Throws:
      kong.unirest.UnirestException
    • put

      public static org.json.JSONObject put(String url, org.json.JSONObject body, HashMap<String,Object> query, HashMap<String,String> headers) throws kong.unirest.UnirestException
      Put
      Parameters:
      url -
      body -
      query -
      headers -
      Returns:
      Throws:
      kong.unirest.UnirestException