现在我正在使用AFNetworking 2.0
,我想将它迁移到AFNetworking 3.0
. 我已将文件添加到项目中,它显示了许多错误。我检查了迁移指南。我的疑问是如何NSURLCredential
在AFNetworking 3.0.4
. 现在我正在使用,
AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request];
if ([url rangeOfString:NSLoginUrl].location != NSNotFound)
{
NSURLCredential *credential = [NSURLCredential credentialWithUser:@"userName" password:@"password" persistence:NSURLCredentialPersistenceNone];
[operation setCredential:credential];
}
但AFNetworking 3
不支持AFHTTPRequestOperation
和
AFHTTPRequestOperationManager
。请帮我。