错误如下:
org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:909)at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1066)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1044)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:1035)
at com.qqweibo.QQNotify.getMethod(QQNotify.java:166)
at com.qqweibo.Jiami.get(Jiami.java:89)
at com.qqweibo.QQNotify.getOauthVerifier(QQNotify.java:82)
at com.tencent.weibo.example.TestQQWeibo.main(TestQQWeibo.java:19)
Caused by: org.apache.http.HttpException: Unable to establish route: planned = {}->http://xxx.com; current = {}->http://yyy.com
at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:842)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:645)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:480)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
... 7 more
我做了临时处理,处理方法就是重建了一个httpclient4实例进行请求。