Skip to content
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

This library makes using URLSession.dataTask ambiguous #62

Closed
mxcl opened this issue Jan 7, 2019 · 2 comments
Closed

This library makes using URLSession.dataTask ambiguous #62

mxcl opened this issue Jan 7, 2019 · 2 comments

Comments

@mxcl
Copy link

mxcl commented Jan 7, 2019

The additional dataTask function this library declares makes normal use of URLSession ambiguous, is this desired? It's quite inconvenient for consumers.

@pietbrauer
Copy link
Member

This library has an interface on URLSessionDataTask, dataTasks are returned as usual but can be switched out to provide better testability or for mocking the network request.

@mxcl
Copy link
Author

mxcl commented Jan 10, 2019

Yes, but it makes any use of URLSession.dataTask ambiguous in any file I need to import this library or a dependent and disambiguating them is tricky, it took me a few tries to make Swift happy. As long as you’re aware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants