func connect(parameter: String) { let request: URLRequest if parameter == "abc" { request = .init(/* A */) } else { request = .init(/* B */) } URLSession.shared.dataTask(with: request).resume() }
let foo: Foo = .init(...)