I am making url calls thru an API that I created using swift as follows:
class API {
let apiEndPoint = \"endpoint\"
let apiUrl:String!
let consumerKey
From the Alamofire README (emphasis added):
Networking in Alamofire is done asynchronously. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are very good reasons for doing it this way.
Rather than blocking execution to wait for a response from the server, a callback is specified to handle the response once it's received. The result of a request is only available inside the scope of a response handler. Any execution contingent on the response or data received from the server must be done within a handler.