AsyncHttpClient无法用Fiddler来抓包的【解决方案】

解决方案:

将AsyncHttpClient的调用代码修改为如下:
添加【client.setProxy(“172.29.14.249”,8888);】

 private void sendPostNoEntity(){
        AsyncHttpClient client = new AsyncHttpClient();
        client.setProxy("172.29.14.249",8888);
        client.post("http://112.4.3.136:8080/portalone/homesdk/NetTVUniLogin", new AsyncHttpResponseHandler() {
            @Override
            public void onSuccess(int i, cz.msebera.android.httpclient.Header[] headers, byte[] bytes) {
                Log.d("hwj", "**AsyncHttpClientActivity onSuccess**");
            }

            @Override
            public void onFailure(int i, cz.msebera.android.httpclient.Header[] headers, byte[] bytes, Throwable throwable) {
                Log.d("hwj", "**AsyncHttpClientActivity onFailure**");
            }
        });
    }

方法来源于【彻底掌握网络通信】的十篇文章

阅读更多

没有更多推荐了,返回首页