<分区>
我正在尝试获取 HttpReponse 的响应代码。没有直接获取响应码的方法。
<分区>
我正在尝试获取 HttpReponse 的响应代码。没有直接获取响应码的方法。
最佳答案
HttpResponse.getStatusLine().getStatusCode()正是您要找的。p>
关于Android HttpResponse 响应代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8148765/
相关文章:
scala - 将 HTTP/REST 请求转发到 Spray 中的另一个 REST 服务器
自 macOS 更新以来,Android Studio 运行缓慢
java - 安卓 Java : HttpURLConnection
android - 单击android中的 ListView 适配器时如何展开和折叠 View
android - 带有 shodows 的自定义 ListView 到 android 中的 ListView 行
c# - GetRequestStream() 返回 WebException 超时......但仅在某些机器上
android - 摆脱 "Exported service does not require permission"警告