小智 6
要解析该响应,请在API接口中定义您的方法,如下所示:
@GET("methodThatReturnsArray")
Call<ArrayList<String>> methodThatReturnsArray();
Run Code Online (Sandbox Code Playgroud)
同步通话看起来像
Call<ArrayList<String>> call = retrofitService.methodThatReturnsArray();
Response response = call.execute();
ArrayList<String> arrayOfStrings = response.body();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1935 次 |
| 最近记录: |