Chain multiple Alamofire requests

Wrapping other asynchronous stuff in promises works like this: func myThingy() -> Promise<AnyObject> { return Promise{ fulfill, reject in Alamofire.request(.GET, “http://httpbin.org/get”, parameters: [“foo”: “bar”]).response { (_, _, data, error) in if error == nil { fulfill(data) } else { reject(error) } } } } Edit: Nowadays, use: https://github.com/PromiseKit/Alamofire-

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)