I\'m trying to use RestKit to call an endpoint that requires basic authentication.
RKObjectMapping *mapping = [RKOb
Using the objectmanager this would be something like:
NSURL* url = [[NSURL alloc]initWithString:@"http://rest.url.com"];
RKObjectManager* objectManager = [RKObjectManager managerWithBaseURL:url];
[objectManager.HTTPClient setAuthorizationHeaderWithUsername:@"username" password:@"password"];
Then, after setting the correct request/response you can use the objectmanager to do a get/post/etc:
[objectManager getObjectsAtPath:endpoint parameters:parameters success:
^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
// do something
}
failure:^(RKObjectRequestOperation *operation, NSError *error) {
// do something
}
];