解决某些时候http请求返回信息无法读取问题

This commit is contained in:
heavyrian2012
2024-08-14 08:35:39 +08:00
parent 94833780ef
commit 9d83f8e3fa
@@ -102,7 +102,7 @@ public class HttpUtils {
if(httpCallback != null) {
int code = response.code();
if(code == 200) {
if(response.body() != null && response.body().contentLength() > 0) {
if(response.body() != null) {
httpCallback.onSuccess(response.body().string());
} else {
httpCallback.onSuccess(null);