ios - ASIHTTPRequestErrorDomain 代码=3 需要身份验证

标签 ios asihttprequest

我正在使用 ASIHTTPRequest ,虽然我可以使用 safari 或 firefox 来获取响应,asihttprequest 返回 ASIHTTPRequestErrorDomain Code=3 需要身份验证,有人帮忙吗?

最佳答案

您的请求应包含您尝试访问的服务器的用户名和密码。

在您的请求中添加以下代码:

[request setUsername:@"test"];
[request setPassword:@"test123"];

关于ios - ASIHTTPRequestErrorDomain 代码=3 需要身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13357719/

相关文章:

ios - ASIHTTPRequest 在 ios8 上导致应用程序崩溃

ios - 使用 AFNetWorking 发送请求时遇到问题

javascript - iOS 和安卓 webview : how to close webview and go back to App?

objective-c - iOS 6 游戏中心

iphone - 设备上的NSdata长度崩溃

ios - 如何使用SWRevealViewController在两个 View 之间传递数组?

objective-c - Objective-C : How to release delegates in this situation

android - 设置具有多个目标的 Urban Airship - 可能有相同的 bundle ID?

ios - ASIHTTPRequest 在委托(delegate)设置时不保存 pdf 文件

iphone - 我如何使用 ASIHTTPRequest 表示这个 CURL?