clients/swift: also patch Sessions.swift — same Apple-only URLSession.data(for:) bug
This commit is contained in:
parent
aeb3c30097
commit
628fb09ac0
1 changed files with 3 additions and 3 deletions
|
|
@ -17,10 +17,10 @@
|
|||
// `withSession(_:_:)` wraps create + work + auto-close (on success and on
|
||||
// throw).
|
||||
|
||||
import Foundation
|
||||
@preconcurrency import Foundation
|
||||
|
||||
#if canImport(FoundationNetworking)
|
||||
import FoundationNetworking
|
||||
@preconcurrency import FoundationNetworking
|
||||
#endif
|
||||
|
||||
extension ForgeClient {
|
||||
|
|
@ -196,7 +196,7 @@ extension ForgeClient {
|
|||
|
||||
let (data, response): (Data, URLResponse)
|
||||
do {
|
||||
(data, response) = try await session.data(for: req)
|
||||
(data, response) = try await session.forgeData(for: req)
|
||||
} catch let urlError as URLError {
|
||||
throw ForgeError.transport(urlError)
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue