Document Client usage with HTTPClientTransport (#77)

* Add test coverage for Client with HTTPClientTransport

* Configure HTTP client transport to stream by default

* Add example usage of streaming HTTP transport to README

* Explicitly set streaming to false in test
This commit is contained in:
Mattt 2025-04-27 09:29:24 -07:00 • committed by GitHub
commit 48c19c282b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -21,7 +21,7 @@ public actor HTTPClientTransport: Actor, Transport {
public init(
endpoint: URL,
configuration: URLSessionConfiguration = .default,
streaming: Bool = false,
streaming: Bool = true,
logger: Logger? = nil
) {
self.init(
@ -269,7 +269,7 @@ public actor HTTPClientTransport: Actor, Transport {
if line.hasSuffix("\r") {
line = line.dropLast()
}
// Lines starting with ":" are comments
if line.hasPrefix(":") { continue }