1.0.0 beta.9
Pre-release
Pre-release
Breaking Changes
API
is renamed toSession
(#86). An instance ofSession
has an instance ofNSURLSession
. If you want to enqueue a request to specificNSURLSession
, instantiateSession
with theNSURLSession
and call its instance methods. Type methods ofSession
use the default instanceSession.sharedSession
.
New code for sending requests looks like below:
let request = /* create a request */
Session.sendRequest(request) { result in
// handle result
}
To enqueue a request into specific NSURLSession
:
let session = Session(URLSession: /* NSURLSession instance here */)
let request = /* create a request */
session.sendRequest(request) { result in
// handle result
}