【发布时间】:2020-09-23 02:54:14
【问题描述】:
我看到了一些非常奇怪的东西。我正在发出 http 发布请求
HttpClient httpClient = new DefaultHttpClient();
HttpResponse response = null;
try {
response = httpClient.execute(httpPost);
HttpEntity entity = response.getEntity();
String strResponse = null;
if (entity != null) {
strResponse = EntityUtils.toString(entity);
Log.i("SetupAutoCardResponse",String.valueOf(strResponse));
Log.i("otherTest","test");
Log.i("otherTest",strResponse);
return true;
}
} catch (IOException e) {
e.printStackTrace();
return false;
}
我在日志中看到的唯一输出是otherTest : Test。
带有strResponse 的日志根本不显示,我的意思是,没有任何显示。它看起来不像 SetupAutoCardResponse : null 或 otherTest: null。绝对什么都没有出现。但我知道我得到了回应。表达式返回true
【问题讨论】:
-
你能在你的 logcat 窗口中检查哪个过滤器(例如,详细或错误)
-
@Rajesh 我尝试了一堆,但它不应该在信息中。这不是
i的用途吗? -
@MohammadZarei 你能解释一下吗?