I am new to restkit.I have integrated restkit 0.20.0-pre6 successfully by following instructions from github. Then I have build my project in console, I got the following
restkit:RKLog.m:34 RestKit logging initialized...
after that I would like to get data at a path
Initially there is an activation screen .so I would like to send activation code to it and if it is correct, I would like to get corresponding details .
NSURL *urll=[NSURL URLWithString:@"http://url/FirstRest/rest/application/Activate"];
AFHTTPClient* client = [[AFHTTPClient alloc] initWithBaseURL:urll];
RKObjectManager *manager = [[RKObjectManager alloc] initWithHTTPClient:client];
[RKObjectManager setSharedManager:manager];
Article *article = [Article new];
article.activationCode = @"S1234";
[manager.router.routeSet addRoute:[RKRoute routeWithClass:[Article class] pathPattern:@"/FirstRest/rest/application/Activate/:activationCode" method:RKRequestMethodGET]];
[[RKObjectManager sharedManager] getObject:article path:nil parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *result)
{
// Request
NSLog(@"result is ************* %@",result);
} failure:^(RKObjectRequestOperation *operation, NSError *error) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}];
`
in my console I'm getting
I restkit.network:RKHTTPRequestOperation.m:179 GET 'http://url/FirstRest/rest/application/Activate/S1234' (200 OK) [1.4744 s]
2013-01-28 14:07:59.284 Polls[985:15103] E restkit.network:RKResponseMapperOperation.m:240 Failed to parse response data: Loaded an unprocessable response (200) with content type 'application/json'
I couldn't find out what does it really means and how to overcome this