我尝试了以下设置基本身份验证用户名和密码,但它似乎没有在请求中传递基本身份验证..
secureManager = [[RKObjectManager objectManagerWithBaseURL:@"http://localhost:3000"] retain];
secureManager.client.username = uname;
secureManager.client.password = pwd;
RKObjectLoader *loader = [svc getObject:user delegate:self];
loader.userData = [NSNumber numberWithInt:RequestLogin];
更新:发现我的问题,我需要添加以下代码片段
secureManager.client.forceBasicAuthentication = YES;