yanzhenjie / Kalle

:apple: Http client for Android platform.
https://yanzhenjie.com/Kalle
Apache License 2.0
592 stars 98 forks source link

DeBug能打印返回的json数据吗 #95

Open gjmm123 opened 4 years ago

gjmm123 commented 4 years ago

DeBug能打印返回的json数据吗

liangjingkanji commented 4 years ago

里面有个LoggerInterceptor 可以打印

liangjingkanji commented 4 years ago

https://github.com/liangjingkanji/Net 我这里还有个支持协程的版本

gjmm123 commented 4 years ago

大佬,Kalle.get(UrlConfig.TESTURL) .tag(this) .perform(new SimpleCallback() { @Override public void onResponse(SimpleResponse<Test, String> response) { if (response.isSucceed()) { Test succeed = response.succeed(); Log.i("mmm", succeed + ""); // tv_content.setText(response.succeed().getMessage()); } else { } } 这里为什么我用String就可以请求到数据,用对象,结果response.succeed()对象返回为空呀

liangjingkanji commented 4 years ago

JSON解析要自己实现转换器, 大哥

gjmm123 commented 4 years ago

好的 ,刚看明白