I use Alamofire 4.0, Swift 4.2 and Xcode 10.2 to request Http Api I have url constant:
let weatherUrl = "http://api.openweathermap.org/data/2.5/weather"
And function:
func getWeatherData(url: String, parameters: [String : String])
{
Alamofire.Request(url, parameters: parameters).responseJSON
{
response in
}
getWeatherData(url: weatherUrl, parameters: params)
And Xcode notify me:"Cannot convert value of type 'String' to expected argument type 'URLSession'".

What is the problem?
Alamofire.Requestneeds to aURL, not aString.