Skip to content

Commit 55732ab

Browse files
Delete unused URLSession.data method method.
1 parent 90e2061 commit 55732ab

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Sources/web3swift/API/Async+BackwardCapability.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@ import Foundation
1010
@available(iOS, obsoleted: 15.0, message: "Use the built-in API instead")
1111
@available(macOS, obsoleted: 12.0, message: "Use the built-in API instead")
1212
extension URLSession {
13-
func data(fromUrl url: URL) async throws -> (Data, URLResponse) {
14-
try await withCheckedThrowingContinuation { continuation in
15-
let task = self.dataTask(with: url) { data, response, error in
16-
guard let data = data, let response = response else {
17-
let error = error ?? URLError(.badServerResponse)
18-
return continuation.resume(throwing: error)
19-
}
20-
continuation.resume(returning: (data, response))
21-
}
22-
task.resume()
23-
}
24-
}
25-
2613
func data(for request: URLRequest) async throws -> (Data, URLResponse) {
2714
var dataTask: URLSessionDataTask?
2815

0 commit comments

Comments
 (0)