400 error with HttpClient for a link with an anchor

前端 未结 4 1540
死守一世寂寞
死守一世寂寞 2021-01-17 03:15

Here is my code:

DefaultHttpClient client = new DefaultHttpClient();
HttpGet request = new HttpGet(url);
HttpResponse response = client.execute(request);
         


        
4条回答
  •  孤独总比滥情好
    2021-01-17 03:42

    There is a bug in Android HttpClient that was fixed in HttpClient 1.2 but not backported to Android

    https://issues.apache.org/jira/browse/HTTPCLIENT-1177

    https://github.com/apache/httpclient/commit/be6347aef0f7450133017b775113a8f3fadd2f1c

    I have opened a bug report at: https://code.google.com/p/android/issues/detail?id=65909

提交回复
热议问题