New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactored All APIs for Swift 3 #1385
Conversation
…ace. Also removed all cases of `Foundation.` prefixes where possible by refactoring all local variables to avoid naming collisions.
// MARK: - Data Request | ||
|
||
/// Creates a data `Request` using the default session manager instance to retrieve the contents of the specified | ||
/// `method`, `urlString`, `parameters`, `encoding` and `headers`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the order of method
and urlString
need to be switched here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Addressed in 2a6ccac.
Thanks for the review @jshier. I'm going to go ahead and merge this then repoint the piggy backed PR to the |
The goal of this PR is to refactor ALL APIs used in the framework and test target source code to align with the Swift 3 API design guidelines.
The codebase has also been reorganized to make it easier to subclass the
SessionManager
,SessionDelegate
andRequest
by eliminating excessive use of extensions by splitting core functionality up by feature.The new top-level APIs now can be used as follows:
There are also several refactored classes, structs and enums including:
Method
is nowHTTPMethod
in ParameterEncoding.swiftManager
is nowSessionManager
in SessionManager.swiftManager.sharedInstance
is nowSessionManager.default
in SessionManager.swiftManager.SessionDelegate
is nowSessionDelegate
in SessionDelegate.swiftRequest.TaskDelegate
is nowTaskDelegate
in TaskDelegate.swiftRequest.DataTaskDelegate
is now `DataTaskDelegate in TaskDelegate.swiftRequest.DownloadTaskDelegate
is now `DownloadTaskDelegate in TaskDelegate.swiftRequest.UploadTaskDelegate
is nowUploadTaskDelegate
in TaskDelegate.swiftI've also updates all the public docstrings to use the new Swift 3 formatting syntax. I fixed several issues within the documentation and updated them to all match the new APIs.