Basically I make a request to a server using NSURLRequest, like: GET http://www.example.com/blah
The response from the server tells the browser to set some cookies. I need these cookies to make subsequent requests to http://www.example.com/blah2 and blah3, etc.
Once I have completed the series of sequential requests I need to rerun them, except I want to get fresh cookies from the server. Ideally, I’d want to delete all cookies on the example.com domain before rerunning the sequence of GETs.
What’s the best way to do this in the Cocoa/iPhone SDK?
Look into
NSHTTPCookieStorage. It should be able to do everything you need.