We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6841f09 commit fd24367Copy full SHA for fd24367
Sources/HTTP/Client.swift
@@ -36,13 +36,14 @@ internal extension URLSession {
36
37
func _data(for request: URLRequest) async throws -> (Data, URLResponse) {
38
try await withCheckedThrowingContinuation { continuation in
39
- self.dataTask(with: request) { data, response, error in
+ let task = self.dataTask(with: request) { data, response, error in
40
if let error = error {
41
continuation.resume(throwing: error)
42
} else {
43
continuation.resume(returning: (data ?? .init(), response!))
44
}
45
46
+ task.resume()
47
48
49
0 commit comments