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

Async step1 #798

Merged
merged 4 commits into from
Sep 12, 2024
Merged

Async step1 #798

merged 4 commits into from
Sep 12, 2024

Conversation

timbms
Copy link
Contributor

@timbms timbms commented Aug 1, 2024

Conformance with URLSessionDelegate, URLSessionTaskDelegate migrated to async/await

@timbms timbms mentioned this pull request Aug 1, 2024
@digitaldan
Copy link
Contributor

Thanks @timbms , i actually was hoping to get rid of this class altogether and instead refactor the Networking class to use the built in URLRequest / URLSession stuff (so remove AlamoFire). I have a working branch to do this, just taking me a bit of time to refactor. Once that happens, when can just use the one networking class instead of having two different ones.

Your changes i think would apply that refactor, let me get a PR up maybe this weekend for us to review.

@timbms
Copy link
Contributor Author

timbms commented Sep 12, 2024

I understand your intention to replace HTTPClient by the refactored Networking class. Ideally this should be done together with the usage of swift-openapi-generator because it allows to get rid of all the custom JSON decoding and to easily migrate to a web socket subscription.
This PR just carries over the compliance with the protocols URLSessionDelegate, URLSessionTaskDelegate to the async counterpart. When using URLSesssion this should be done anyway. If all goes well this is just an equivalent replacement for the functions using completion handler. This PR should be mergeable without any problem but of course it requires testing before a release.

@digitaldan digitaldan merged commit 722bd25 into develop Sep 12, 2024
2 checks passed
@digitaldan digitaldan deleted the async branch September 12, 2024 15:22
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

Successfully merging this pull request may close these issues.

2 participants