از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
IRestApiHelper
public interface IRestApiHelper
com.android.tradefed.util.IRestApiHelper |
زیر کلاس های غیر مستقیم شناخته شده |
یک رابط کمکی برای انجام تماس های REST API.
خلاصه
روش های عمومی |
---|
abstract HttpResponse | execute (String method, String[] uriParts, options, JSONObject data) execute (String method, String[] uriParts, options, JSONObject data) یک درخواست API را اجرا می کند. |
روش های عمومی
اجرا کنند
public abstract HttpResponse execute (String method,
String[] uriParts,
options,
JSONObject data)
یک درخواست API را اجرا می کند.
پارامترها |
---|
method | String : یک روش HTTP درخواست |
uriParts | String : بخشهای URI کد شده URL برای ساخت URI درخواست استفاده میشود. |
options | : نام ها و مقادیر پارامترهای رمزگذاری نشده مورد استفاده برای ساخت رشته پرس و جو |
data | JSONObject : داده هایی که باید همراه با درخواست ارسال شوند |
برمی گرداند |
---|
HttpResponse | یک شی HttpResponse |
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# IRestApiHelper\n==============\n\n\n`\npublic\n\n\ninterface\nIRestApiHelper\n`\n\n\n`\n\n\n`\n\n|------------------------------------------|\n| com.android.tradefed.util.IRestApiHelper |\n\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known indirect subclasses [RestApiHelper](../../../../../../reference/tradefed/com/android/tradefed/util/RestApiHelper.html) |----------------------------------------------------------------------------------------------------|-----------------------------------------------| | [RestApiHelper](../../../../../../reference/tradefed/com/android/tradefed/util/RestApiHelper.html) | A helper class for performing REST API calls. | |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nA helper interface for performing REST API calls.\n\nSummary\n-------\n\n| ### Public methods ||\n|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract HttpResponse` | ` `[execute](../../../../../../reference/tradefed/com/android/tradefed/util/IRestApiHelper.html#execute(java.lang.String,%20java.lang.String[],%20\u003cany\u003e,%20org.json.JSONObject))`(String method, String[] uriParts, ` options, JSONObject data) Executes an API request. |\n\nPublic methods\n--------------\n\n### execute\n\n```\npublic abstract HttpResponse execute (String method, \n String[] uriParts, \n options, \n JSONObject data)\n```\n\nExecutes an API request.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|----------------------------------------------------------------------------------|\n| `method` | `String`: a HTTP method of the request \u003cbr /\u003e |\n| `uriParts` | `String`: URL encoded URI parts to be used to construct the request URI. \u003cbr /\u003e |\n| `options` | : unencoded parameter names and values used to construct the query string \u003cbr /\u003e |\n| `data` | `JSONObject`: data to be sent with the request \u003cbr /\u003e |\n\n| Returns ||\n|----------------|------------------------------|\n| `HttpResponse` | a HttpResponse object \u003cbr /\u003e |\n\n| Throws ||\n|---|-------------|\n| | IOException |"]]