gpt4 book ai didi

android - AndroidHttpClient 中的 HttpRequestInterceptor。我糊涂了!

转载 作者:太空狗 更新时间:2023-10-29 12:56:44 26 4
gpt4 key购买 nike

我在我的应用程序中使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com