I am posting to a uri using RestKit
NSString* path = [NSString stringWithFormat:@"myPathHere"];
NSDictionary *params = [NSDictionary dictionaryWithKeysAndObjects:@"rating",[rating stringValue], nil];
[[RKObjectManager sharedManager].client post:path params:params delegate:self];
The server will respond with an updated version of my managedObject “Item”.
How do I go about mapping this item. Do I use the following delegate method?
- (void)request:(RKRequest *)request didLoadResponse:(RKResponse *)response{}
I know that from here I can get the response JSON value but how do I change that into the mapped object?
Any help is much appreciated.
Thanks!
When I’ve needed to map my server objects I make the request like this:
and then the object comes back in this method:
I then post the updated object with the Notification Manager
The best documentation is at https://github.com/RestKit/RestKit/blob/master/Docs/Object%20Mapping.md