Adopt the new shared HTTP client by czechboy0 · Pull Request #13 · swift-server/swift-openapi-async-http-client (original) (raw)

Motivation

Now that SwiftNIO/AsyncHTTPClient have a singleton variant of the EventLoopGroup, which allows creating an HTTPClient without any argument, let's simplify the initializer of the transport to take advantage of it - bringing it in line with the URLSession transport.

Modifications

Default the HTTPClient to a new one with a default event loop group, and remove the mandatory shutdown call.

Result

Adopters can more easily create the AHC transport.

Test Plan

N/A