java - Okhttpclient 得到错误响应
问题描述
我在其页面源中声明显示 97 的 url...根据我的代码,我得到 85 作为我的输出()..请帮助我
OkHttpClient client = new OkHttpClient();
request = new Request.Builder().url(url).build();
client.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
System.out.print("Account Setup Failed");
}
@Override
public void onResponse(Call call, Response response) throws IOException {
final String myR = response.body().string();
LoginPage.this.runOnUiThread(new Runnable() {
@Override
public void run() {
MySystem.visitor = Integer.parseInt(myR.toString());
}
});
}
});
解决方案
推荐阅读
- c# - 在 Xamarin.Forms 中使用 SignalR 发送/接收通知
- python - AttributeError:模块'cv2.cv2'没有属性'bgsegm
- node.js - `npm link x` 和 `npm install /path/to/x` 之间的区别
- node.js - mongodb:过期不工作
- javascript - 如何删除表格中的侧边和底边
- python - mac os 上“swagger-render”的语法错误
- c++ - 使用 OpenCV 和 C++ 将 16 位灰度图像更改为彩色图像
- c# - 当“启用编辑”关闭时,无法将数据从 excel 文件导出到数据库表
- django - 模板渲染(Django):
- android - dl.google.com:443 未能响应