IRestApiHelper

public interface IRestApiHelper

com.android.tradefed.util.IRestApiHelper


用於執行 REST API 呼叫的輔助介面。

摘要

公用方法

abstract HttpResponse execute(String method, String[] uriParts, Map<String, Object> options, JSONObject data)

執行 API 要求。

公用方法

execute

public abstract HttpResponse execute (String method, 
                String[] uriParts, 
                Map<String, Object> options, 
                JSONObject data)

執行 API 要求。

參數
method String:要求的 HTTP 方法

uriParts String:用於建構要求 URI 的網址編碼 URI 部分。

options Map:用於建構查詢字串的未編碼參數名稱和值

data JSONObject:要隨要求傳送的資料

傳回
HttpResponse HttpResponse 物件

擲回
java.io.IOException
IOException