Skip to content

Conversation

@Aldo10012
Copy link
Owner

What's the reason for this PR?

Inside of the different request performing class, we support:

  • async/await & AsyncStream (Swift Concurrency)
  • completion handlers
  • publishers (Combine)

To prevent writing duplicate code, the completion handler method was used as the CORE implementation, and Swift concurrency and combine methods are wrappers of the completion handler method.

Apple recommends that any new async code should be written in Swift Concurrency.

Follow up to:

What's new?

This PR focuses on FileDownloadable. Other classes will be refactored in follow up PRs.

  1. Make swift concurrency method the core implementation handling networking logic,
  2. Make non swift-concurrency methods be wrapper methods.
  3. Replace .uploadFileTask(...) return type from URLSessionUploadTask to CancellableRequest

@Aldo10012 Aldo10012 marked this pull request as ready for review February 4, 2026 04:59
@Aldo10012 Aldo10012 merged commit 8bcc43e into main Feb 4, 2026
10 checks passed
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