-
Notifications
You must be signed in to change notification settings - Fork 205
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
Merge branch 'develop/4.0' into 'master' #281
Conversation
How was this not already there?
DataParser should not be required to return Any and have objects checked for type safety at runtime. This allows us to use the Swift build time type checking system with very minimal changes to existing code. The only API breaking change is that Request classes using the default JSONDataParser should now conform to JSONRequest, instead of just Request. This is because protocol extensions cannot declare default associated types.
Add QueryParameters protocol to provide interface for URL query.
Data parser associated types
While the upload is in progress, `progressHandler` closure is periodically called. Therefore you can get information of uploading about `didSendBodyData` `totalBytesSent` `totalBytesExpectedToSend`. These parameters are defined by `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)` in `URLSessionTaskDelegate`.
…apter` protocol.
Add a way to get progress of uploading.
Fix `progressHandler` to work properly
Rename Request.Parser to Request.DataParser
Checking in on this PR since this project seems unattended atm. Maybe I can propose a smaller PR to be merged? I was originally interested in #230 in particular so it might be good to start there. If there's no interest I'll just close this PR and stick with my forked master. Additionally: I'd happily sponsor this project if offered through GitHub Sponsors. Please consider enabling it for this repo :) |
Closing in favor of #305 |
As mentioned here, some very useful changes were lost from
develop/4.0
. This branch introduces these changes into master.They're breaking changes, so a major version update is required.
We can alternatively branch off master into
develop/6.0
and merge these changes there but I fear the same loss may happen again this way.