mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-10 05:36:30 +08:00
Added ability to overload the params on object loaders composed by the object manager. fixes #352
This commit is contained in:
@@ -297,7 +297,7 @@
|
||||
|
||||
// Invoked just before request hits the network
|
||||
- (BOOL)prepareURLRequest {
|
||||
if (self.sourceObject && (self.method == RKRequestMethodPOST || self.method == RKRequestMethodPUT)) {
|
||||
if ((self.sourceObject && self.params == nil) && (self.method == RKRequestMethodPOST || self.method == RKRequestMethodPUT)) {
|
||||
NSAssert(self.serializationMapping, @"Cannot send an object to the remote");
|
||||
RKLogDebug(@"POST or PUT request for source object %@, serializing to MIME Type %@ for transport...", self.sourceObject, self.serializationMIMEType);
|
||||
RKObjectSerializer* serializer = [RKObjectSerializer serializerWithObject:self.sourceObject mapping:self.serializationMapping];
|
||||
|
||||
Reference in New Issue
Block a user