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:
parent
ccb070f2f0
commit
48c19c282b
1 changed files with 222 additions and 20 deletions
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue