Skip to content

Commit a061d78

Browse files
committed
make Configuration.init with HTTPVersion internal
1 parent 7e5a523 commit a061d78

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

Diff for: Sources/AsyncHTTPClient/HTTPClient.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ public class HTTPClient {
626626
)
627627
}
628628

629-
public init(
629+
internal init(
630630
tlsConfiguration: TLSConfiguration? = nil,
631631
redirectConfiguration: RedirectConfiguration? = nil,
632632
timeout: Timeout = Timeout(),

Diff for: Tests/AsyncHTTPClientTests/HTTP2ClientTests.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ class HTTP2ClientTests: XCTestCase {
2626
func makeDefaultHTTPClient() -> HTTPClient {
2727
var tlsConfig = TLSConfiguration.makeClientConfiguration()
2828
tlsConfig.certificateVerification = .none
29+
var config = HTTPClient.Configuration()
30+
config.tlsConfiguration = tlsConfig
31+
config.httpVersion = .automatic
2932
return HTTPClient(
3033
eventLoopGroupProvider: .createNew,
31-
configuration: HTTPClient.Configuration(
32-
tlsConfiguration: tlsConfig,
33-
httpVersion: .automatic
34-
),
34+
configuration: config,
3535
backgroundActivityLogger: Logger(label: "HTTPClient", factory: StreamLogHandler.standardOutput(label:))
3636
)
3737
}
@@ -124,12 +124,12 @@ class HTTP2ClientTests: XCTestCase {
124124
let elg = MultiThreadedEventLoopGroup(numberOfThreads: numberOfWorkers)
125125
var tlsConfig = TLSConfiguration.makeClientConfiguration()
126126
tlsConfig.certificateVerification = .none
127+
var config = HTTPClient.Configuration()
128+
config.tlsConfiguration = tlsConfig
129+
config.httpVersion = .automatic
127130
let localClient = HTTPClient(
128131
eventLoopGroupProvider: .shared(elg),
129-
configuration: HTTPClient.Configuration(
130-
tlsConfiguration: tlsConfig,
131-
httpVersion: .automatic
132-
),
132+
configuration: config,
133133
backgroundActivityLogger: Logger(label: "HTTPClient", factory: StreamLogHandler.standardOutput(label:))
134134
)
135135
defer {

0 commit comments

Comments
 (0)