Skip to content

Commit a69c910

Browse files
committed
Move PackageCollectionProvider to async/await
1 parent bf4e41d commit a69c910

File tree

5 files changed

+260
-301
lines changed

5 files changed

+260
-301
lines changed

Sources/Basics/HTTPClient/LegacyHTTPClient.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,17 @@ public final class LegacyHTTPClient: Cancellable {
307307
}
308308

309309
extension LegacyHTTPClient {
310+
public func head(
311+
_ url: URL,
312+
headers: HTTPClientHeaders = .init(),
313+
options: Request.Options = .init(),
314+
observabilityScope: ObservabilityScope? = .none
315+
) async throws -> Response {
316+
try await safe_async {
317+
self.head(url, headers: headers, options: options, completion: $0)
318+
}
319+
}
320+
@available(*, noasync, message: "Use the async alternative")
310321
public func head(
311322
_ url: URL,
312323
headers: HTTPClientHeaders = .init(),

0 commit comments

Comments
 (0)