在我的应用中,我想使用Retrofit2
连接到服务器并获取一些数据。
为此,我编写了如下所示的代码,但未显示数据。并且由于某种原因,不会输出(详细)错误。
private void getDetailData(String auctionID, final String jwtToken) {
showLoading(true);
Call<DetailResponse> call = apis.getDetainAuctions(auctionID, jwtToken, agent);
call.enqueue(new Callback<DetailResponse>() {
@Override
public void onResponse(Call<DetailResponse> call, final Response<DetailResponse> response) {
Log.e("detailLog", "OK");
Log.e("detailLog", response.message() + " --- " + response.errorBody());
if (response.isSuccessful()) {
}
}
@Override
public void onFailure(Call<DetailResponse> call, Throwable t) {
Log.e("detailLog", "Err : " + t.getMessage());
}
});
}
Logcat错误:
E/detailLog: --- okhttp3.ResponseBody$1@cbf85bc
错误是什么意思?