1

I am using AFNetworking 2. I am doing the syncing process. When I logout the app i want to stop the request and after the login i want to send the new request.

So I am using operation cancel method.

[[AFHTTPRequestOperationManager manager].operationQueue cancelAllOperations];

when i used this method it was cancelled. But when i start, it is using previous request as well. it is calling previous request.

Because here request header having the login token. When I log out and login token should be changed. But here after second login time first request having previous token because of the previous queue.

How to cancel network request with afnetworking

Check this as well.

Community
  • 1
  • 1
Puvanarajan
  • 2,786
  • 6
  • 26
  • 37

0 Answers0