Alamofire network calls not being run in background thread
问题 It is my understanding that by default, Alamofire requests run in a background thread. When I tried running this code: let productsEndPoint: String = "http://api.test.com/Products?username=testuser" Alamofire.request(productsEndPoint, method: .get) .responseJSON { response in // check for errors guard response.result.error == nil else { // got an error in getting the data, need to handle it print("Inside error guard") print(response.result.error!) return } // make sure we got some JSON since