Skip to content

1.0.0 beta.9

Pre-release
Pre-release
Compare
Choose a tag to compare
@ishkawa ishkawa released this 19 Oct 19:09
· 599 commits to master since this release

Breaking Changes

  • API is renamed to Session (#86). An instance of Session has an instance of NSURLSession. If you want to enqueue a request to specific NSURLSession, instantiate Session with the NSURLSession and call its instance methods. Type methods of Session use the default instance Session.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
}