RestKit/RestKit — Issue #567: serializationMIMEType not set when using objectLoaderWithResourcePath:delegate:
Author: port339
Created: 2012-02-24 13:05:25+00:00
State: open

Hey,

I just noticed that when creating an `RKObjectLoader` from an `RKObjectManager` using `objectLoaderWithResourcePath:delegate:` the property `serializationMapping`is not set. Actually it is `nil` which leads to objects being sent not to be sent at all (empty request body). I think it would be better to set the `serializationMapping` to the `RKObjectManager`s `serializationMapping` instead:

```- (id)initWithResourcePath:(NSString*)resourcePath objectManager:(RKObjectManager*)objectManager delegate:(id)delegate {
if ((self = [super initWithURL:[objectManager.client URLForResourcePath:resourcePath] delegate:delegate])) {
_objectManager = objectManager;

//added following line
self.serializationMIMEType = self.objectManager.serializationMIMEType;

[self.objectManager.client setupRequest:self];
}

return self;
}```

Regards,
Nicolas