The global request APIs have been moved into an enum in AF5. It should now be AF.request.
if you are using Alamofire 5 or later then you should use AF.request instead of Alamofire.request.
AF.request(url, method: .get)
Reference link: https://stackoverflow.com/questions/52900273/alamofire-5-showing-error-after-installing-it-with-carthage-alamofire-has-no
Most helpful comment
The global request APIs have been moved into an enum in AF5. It should now be
AF.request.