Skip to content

Instantly share code, notes, and snippets.

@stevemoser
Created August 24, 2012 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevemoser/3444636 to your computer and use it in GitHub Desktop.
Save stevemoser/3444636 to your computer and use it in GitHub Desktop.
RestKit Post
NSURL* baseURL = [NSURL URLWithString:@"https://api.example.com/"];
RKObjectManager* objectManager = [RKObjectManager objectManagerWithBaseURL:baseURL];
objectManager.acceptMIMEType = RKMIMETypeJSON;
objectManager.serializationMIMEType = RKMIMETypeJSON;
[objectManager.mappingProvider setMapping:[SMArticle mapping] forKeyPath:@"article"];
[objectManager.mappingProvider
setSerializationMapping:[SMArticle serializationMapping] forClass:[SMArticle class]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment