Using Alamofire with configurations like this, leading to error -999 request cancelled
let configuration = URLSessionConfiguration.default
configuration.timeoutIntervalForRequest = 20
configuration.requestCachePolicy = .reloadIgnoringLocalCacheData
var sessionManager = Alamofire.SessionManager(configuration: configuration)
sessionManager.request(url,
method: methodType,
parameters: resource.parameters,
headers: resource.headers)
However when i use it like this, directly it works fine, but it caches the responses ..
Alamofire.request(url,
method: methodType,
parameters: resource.parameters,
headers: resource.headers)
I need to ignore the cached data, and using the first is not working .