I am using RestKit for connecting to our WCF Data Services.
I am having issues with adding an entity using RKObjectManager's postObject function due to response mapping issues.
When an entity is added, WCF Data Services returns a 201 status code and the newly added entity(as response).
Is it possible to ignore the response and just use the status code returned to check if the add succeeded?
Ponnu
Why would you want to ignore the newly added entity returned from the server? Mapping that result is useful to keep in sync your local representation with the server's one. The server may have overwritten some field of your object like the object id and you want to keep track of it.
If you have mapping error it's probably because the response to the POST action returns a representation of your object which differs from the one returned with a GET. Have you tried using:
- (RKObjectLoader*)postObject:(id<NSObject>)object mapResponseWith:(RKObjectMapping*)objectMapping delegate:(id<RKObjectLoaderDelegate>)delegate
instead and specify a more suitable mapping for the data returned?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With