-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add session delegate to initializer #44
Conversation
395733a
to
5cc6bc9
Compare
19d2d73
to
e596d49
Compare
e596d49
to
5a2874c
Compare
@@ -20,7 +20,7 @@ extension URLSession { | |||
/// - delegate: Delegate to get events about request (NOT WORKING💀) | |||
/// - Returns: Tuple with Data and URLResponse | |||
public func data( | |||
for request: URLRequest, | |||
forRequest request: URLRequest, |
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.
This is a change in the public API, so I think you should update the major version in the podspec
file. Or at least a minor version 😄
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.
we don't need this extension at all now. it was implemented at time when URLSession
had their async/await methods ready for use only since iOS 15. so to make URLSessionClient
implementataion for iOS 13 and easy to read i have made this extension with async/await methods.
now this methods are in URLSession
available since iOS 13 so you can just delete this file and it will work justs fine
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.
and also now you can get rid of AsyncAwaitHelper
file too
#42 will be fixed also
@@ -20,7 +20,7 @@ extension URLSession { | |||
/// - delegate: Delegate to get events about request (NOT WORKING💀) | |||
/// - Returns: Tuple with Data and URLResponse | |||
public func data( | |||
for request: URLRequest, | |||
forRequest request: URLRequest, |
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.
we don't need this extension at all now. it was implemented at time when URLSession
had their async/await methods ready for use only since iOS 15. so to make URLSessionClient
implementataion for iOS 13 and easy to read i have made this extension with async/await methods.
now this methods are in URLSession
available since iOS 13 so you can just delete this file and it will work justs fine
@@ -20,7 +20,7 @@ extension URLSession { | |||
/// - delegate: Delegate to get events about request (NOT WORKING💀) | |||
/// - Returns: Tuple with Data and URLResponse | |||
public func data( | |||
for request: URLRequest, | |||
forRequest request: URLRequest, |
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.
and also now you can get rid of AsyncAwaitHelper
file too
#42 will be fixed also
- remove URLSession extension - remove AsyncAwaitHelper - remove ProgressWrapper - remove AsyncAwaitHelper tests
@vani2 somehow tests always fails. i can't figure out why so |
func data(for request:, delegate:) async throws -> (Data, URLResponse)
tofunc data(forRequest:, delegate:) async throws -> (Data, URLResponse)
because it conflicts withFoundation
.delegate: URLSessionDelegate
toURLSessionClient
init.