【发布时间】:2022-01-26 09:19:25
【问题描述】:
如何获取 json 请求正文?
App.getApi().method(data).enqueue(new Callback<Obj>() {
@Override
public void onResponse(Call<Obj> call, Response<Obj> response){
// print here
}
...
};
【问题讨论】:
-
也添加您的 api 响应
-
响应码200
-
会在数据对象内吗?
-
Log.e("response : ", new Gson().toJson(response.body()) );
-
在此处添加下面的打印
标签: android json gson retrofit