Right Way for changing timeoutIntervalForRequest in Alamofire
问题 I changed timeoutIntervalForRequest with let manager = Alamofire.SessionManager.default manager.session.configuration.timeoutIntervalForRequest = 3 manager.request(url).response {} but seems not worked, Any suggestion? 回答1: This worked for me :) let configuration = URLSessionConfiguration.default configuration.timeoutIntervalForRequest = TimeInterval(7) configuration.timeoutIntervalForResource = TimeInterval(7) let session = URLSession(configuration: configuration) let task = session.dataTask