From f62f75d91c4606a8da4e66b6a17b99711662fbe6 Mon Sep 17 00:00:00 2001 From: Eric Rosenberg Date: Tue, 16 Jun 2026 17:16:29 +0000 Subject: [PATCH] Make AHCHTTPClient.HTTPClient.Reader's init public MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Reader struct already exposes a public AsyncReader conformance, but its `init(body:)` was internal — so callers outside AHCHTTPClient could spell the type but couldn't construct one. Promoting the init to public lets out-of-package adapters wrap an `HTTPClientResponse.Body` directly. --- Sources/AHCHTTPClient/AHC+HTTPClient.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/AHCHTTPClient/AHC+HTTPClient.swift b/Sources/AHCHTTPClient/AHC+HTTPClient.swift index 616b61c..931f57b 100644 --- a/Sources/AHCHTTPClient/AHC+HTTPClient.swift +++ b/Sources/AHCHTTPClient/AHC+HTTPClient.swift @@ -101,7 +101,7 @@ extension AsyncHTTPClient.HTTPClient: HTTPAPIs.HTTPClient { var buffer = UniqueArray() var trailersDelivered: Bool = false - init(body: HTTPClientResponse.Body) { + public init(body: HTTPClientResponse.Body) { self.body = body self.underlying = body.makeAsyncIterator() }