URLSession and Swift Concurrency: Does cancelling a Task abort the underlying dataTask?
Goal When a Swift Task is cancelled, ensure that the associated URLSessionDataTask is terminated immediately to prevent unnecessary network usage and battery drain. Challenge URLSession’s data(for:) overload forwards cancellation only when explicitly used; otherwise cancelling the enclosing Task does not affect the underlying network task. Similarly, Combine