Be able to cancel a request when using async await functions of URLSession #69261
Labels
feature
A feature request or implementation
Foundation
transfer candidate
The issue may belong in another repository
Motivation
When changing to use async await functions from URLSession I noticed that we lost access to URLSessionDataTask which is necessary when we need to cancel a request. And we need this kind of function especially when working with Feed screens and things alike.
Solution
We already can create an URLSessionDataTask but we don't have an async await function to perform it so my solution would be to add a function that performs URLSessionDataTask and the result would be the same (Data, Response) tulple
Alternatives considered
Another solution would be to add this
performasync await function at the URLSessionDataTask as the resume function that it already has but in this case, would be an async await functionThe text was updated successfully, but these errors were encountered: