我在我的应用程序中使用 AndroidHttpClient。现在我需要对请求使用基本授权。
http://developer.android.com/reference/android/net/http/AndroidHttpClient.html
在文档中,他们说我可以使用 HttpRequestInterceptor,但我不知道我该怎么做。没有添加此拦截器的方法。理想情况下,我想像他们在这里那样添加它: http://dlinsin.blogspot.com/2009/08/http-basic-authentication-with-android.html
有人知道为什么它对我不起作用或 Google 文档有误吗?
最佳答案
好吧,这是不可能的,显然文档是错误的。必须使用普通的 HttpClient 才能让它工作。
关于android - AndroidHttpClient 中的 HttpRequestInterceptor。我糊涂了!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5839075/