gonzalezreal/Overcoat — pull request #39 by gonzalezreal (2014-05-18 20:57:22+00:00)
Title: Add support for NSURLSession, Core Data persistence and 'envelop' responses

This PR brings the following improvements:

* New client classes `OVCHTTPRequestOperationManager` and `OVCHTTPSessionManager`.
* Developers targeting iOS 7 or Mac OS X 10.9 or later are encouraged to subclass `OVCHTTPSessionManager`.
* For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `OVCHTTPRequestOperationManager` may be used to similar effect.

* Model classes can be specified in a declarative way. Just override `+modelClassesByResourcePath` and `+ errorModelClass`. URL patterns are used to match responses with model objects.
```objc
+ (Class)errorModelClass {
return [MyError class];
}

+ (NSDictionary *)modelClassesByResourcePath {
return @{
@"thing/#": [Thing class],
@"things": [Thing class]
};
}
```
* `OVCResponse` has been added to support 'envelop' responses. Users can now specify a `OVCResponse` subclass into which responses will be serialised.
* Clients can now be initialized with a managed object context that will be used to persist model objects parsed from a response. If the context concurrency type is not `NSPrivateQueueConcurrencyType`, a private context will be used to perform insertions in the background.
* All HTTP verbs are supported now.