class APIClient {
var user = User()
let alamoFireManager : Alamofire.Manager?
let center = NSNotificationCenter.defaultCenter()
init(){
let con
I guess this one works for you, note that you have to declare instance of Alamofire.Manager outside the function, please see below code
//Declare it out side the function
var alamoFireManager : Alamofire.Manager!
func callUrl() {
let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
configuration.timeoutIntervalForResource = 10800 // seconds
configuration.timeoutIntervalForRequest = 10800 // seconds
alamoFireManager = Alamofire.Manager(configuration: configuration)
alamoFireManager.request(.POST, url, parameters: dir as? [String : AnyObject], encoding: .JSON, headers: [ "Content-Type": "application/json"])
.responseJSON { response in
}
}
hope this helps you