Android的改造导致的Socket超时异常 [英] Android Retrofit Causes Socket Timeout Exception

查看:216
本文介绍了Android的改造导致的Socket超时异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个POST调用使用在Android的Galaxy S3的改装库(/的Nexus 7)设备运行Struts2的Tomcat服务器。该POST调用失败。将tomcat日志显示插槽超时异常。

I am making a POST call to a tomcat server running Struts2 using the retrofit library on an Android Galaxy S3 (/Nexus 7) device. The POST call fails. The tomcat log shows Socket timeout exception.

使用通过卷曲做没有任何问题,完全一样的头同一职位。我验证了电线上的数据相匹配使用查尔斯代理。

The same POST using the exact same headers done via curl does not have any issues. I verified that the data on the wire matches using charles proxy.

在调试这个问题的任何提示/想法。

Any tips/ideas on debugging this issue.

该职位的呼叫如下:

@POST(Constants.URL_GET_ORDER_LIST_BASE)
   void getCardOrderList(@Body GetOrderListRequest getOrderListRequest, Callback<GetOrderListResponse> cbGetOrderListResponse);

请让我知道如果我需要增加更多的信息,解释这更好的。

Please let me know if I need to add more information to explain this better.

推荐答案

添加广场的OKHTTP库到libs文件夹固定的问题。

Adding Square's OKHTTP library into the libs folder fixed the issue.

这篇关于Android的改造导致的Socket超时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆