Open
Description
This is quite a minor issue but redirectConfiguration
sticks out:
public init(tlsConfiguration: TLSConfiguration? = nil,
redirectConfiguration: RedirectConfiguration? = nil,
timeout: Timeout = Timeout(),
proxy: Proxy? = nil,
ignoreUncleanSSLShutdown: Bool = false,
decompression: Decompression = .disabled) {
When I'm initialising a Configuration
, I know that I'd be configuring the redirect configuration. I think it should be called redirects:
or something similar.
Also, the type isn't great. It shouldn't be optional.
See Xcode's completion (which is accurate):
You'd expect that .none
and .disallow
are the same but .none
secretly means "default" (which is not .disallow
). The parameter should be non-optional and default to a new value .default
.
We should deprecate this init
and also fix the other optional ones.