AFNetworking的摘要访问身份验证

时间:2015-08-03 09:51:09

标签: objective-c afnetworking

我需要使用摘要式身份验证,但使用AFNetworking它不起作用

2 个答案:

答案 0 :(得分:4)

要使用AFNetworking 3.0,以下代码可用于AFURLSessionManager。

{{1}}

答案 1 :(得分:1)

这对我有用

AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:@"Username" password:@"Password" persistence:NSURLCredentialPersistenceForSession];
[manager setCredential:credential]; 
相关问题