I think with the actual version of Alamofire, the "URLEncoding.default" isn't working anymore because it has to be type of ParameterEncoder. I found some things on the internet I don't understand so far, but I came up with another solution like...
let params = [
"term": searchText.replacingOccurrences(of: " ", with: "+"),
and the Alamofire request,
AF.request(url, parameters: params).responseData.....
I also get some better results when I search for some other names with the "+" instead of "%20" or whatever its putting in there. :)
But don't know if I will run in some other problems later doing it like this, so lets see what comes, so far enjoying your course. :)
I hope everything makes sense, if not, its because I also have to work more on my english. ^^