Closed
Description
private let sharedSingleton: HTTPClient = {
let httpClient = HTTPClient(eventLoopGroupProvider: .singleton)
Unmanaged.takeUnretained(httpClient) // don't ever deinit this guy
}()
extension HTTPClient {
public var shared: HTTPClient {
return sharedSingleton
}
}
? This has some issues around the configuration (solved by #392) but I'm pretty sure we can just create a somewhat sensible configuration that is standard and call it a day. If users do need special config, they can always create their own HTTPClient(eventLoopGroupProvider: .singleton, configuration: ...)
.
Possible once #697 is merged