I wrote
class Property{
...
static var alamofireManager: SessionManager{
let sessionConfiguration = URLSessionConfiguration.default
sessionConfiguration.timeoutIntervalForRequest = 10
return Alamofire.SessionManager(configuration: sessionConfiguration)
}
...
}
for multiple classes' functions to use it.
However, when I use it:
Property.alamofireManager.request(loginURL).validate(contentType: ["application/json"]).responseJSON{ response in
....
I get error saying :
Task <1F6C95AA-C878-439F-87ED-1055D19E3ADD>.<1> finished with error - code: -999
I know it works if I just use Alamofire. Does anyone know why this is not working?
Thank you!