Reputation: 130
If the app makes a request that returns a response with a Set-Cookie header, the next time when I open the app and make the same request, will it attach the cookie from previous call?
let task = URLSession.shared.dataTask(with: url, completionHandler: { data, response, error in
})
task.resume()
Upvotes: 1
Views: 1018
Reputation: 2262
If you use default or background URLSessionConfiguration
then cookies will be persisted.
Upvotes: 2