Skip to content

Commit

Permalink
Fixed Linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed Oct 5, 2022
1 parent 6841f09 commit fd24367
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/HTTP/Client.swift
Expand Up @@ -36,13 +36,14 @@ internal extension URLSession {

func _data(for request: URLRequest) async throws -> (Data, URLResponse) {
try await withCheckedThrowingContinuation { continuation in
self.dataTask(with: request) { data, response, error in
let task = self.dataTask(with: request) { data, response, error in
if let error = error {
continuation.resume(throwing: error)
} else {
continuation.resume(returning: (data ?? .init(), response!))
}
}
task.resume()
}
}
}

0 comments on commit fd24367

Please sign in to comment.