Skip to content

Commit 7edc421

Browse files
authored
Default the configuration parameter (#32)
Default the configuration parameter ### Motivation The AsyncHTTPClient transport API has undergone changes in recent months and we didn't bring back the default initializer after we adopted the shared EventLoopGroup, allowing you to create a transport with just `let transport = AsyncHTTPClientTransport()`. ### Modifications Default the configuration parameter in the initializer to be able to do that. It's already documented to work, but it doesn't. ### Result Match the documented behavior of being able to use `let transport = AsyncHTTPClientTransport()`. ### Test Plan Tests still pass. Reviewed by: dnadoba Builds: ✔︎ pull request validation (5.10) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #32
1 parent 1ab51fe commit 7edc421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/OpenAPIAsyncHTTPClient/AsyncHTTPClientTransport.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public struct AsyncHTTPClientTransport: ClientTransport {
135135

136136
/// Creates a new transport.
137137
/// - Parameter configuration: A set of configuration values used by the transport.
138-
public init(configuration: Configuration) {
138+
public init(configuration: Configuration = .init()) {
139139
self.init(configuration: configuration, requestSender: AsyncHTTPRequestSender())
140140
}
141141

0 commit comments

Comments
 (0)