Alex Rivera | Logout

Objective-C Asynchronous Web Request with Cookies

Asked 2009-04-01T10:49:04.593
9

I am writing a program in Objective-C and I need to make web requests to web server, but asynchronously and I am fairly new on mac, I am very good at windows technologies, but I need to know that if I use NSOperation (introduced in 10.5, i am assuming that it will not run in 10.4 MAC?), or if it was implemented such that it utilizes system threading which will be available on 10.4?

Or I should create a new thread and create a new runloop, also how to use cookies etc, if anyone can give me one small example, that will be of great help. I want this sample to run on mac 10.4 too if possible.

Edit
Report

1 Answer

3

I am able to fetch cookie in such way:

NSArray* arr = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:[NSURL URLWithString: @"http://google.com" ]];

This one works fine for asynchronous request as well.

answered 2010-08-10T11:21:34.663

Your Answer