Asyncronous requests?

Jul 26, 2010 at 1:14 PM
I'm a little disappointed the odata client lib doesn't seem to support asynchronous requests. I realize there are ways to add this myself but I'm still trying to figure out the best way to go about it. Anyone else solved this issue already?
Aug 26, 2010 at 12:33 PM

I am also interested in the ability to execute requests asynchronously. For now, I am going to try to implement it myself in the following way:

 - write a method that calls oData service and processes the response. After the response is received, a notification should be sent using postNotificationName:object:userInfo: method of the NSNotificationCenter class. It is possible to use the userInfo dictionary to pass data received from the service;

 - add an observer for the notification. It will extract data from the userInfo dictionary and process it according to my application's logic;

 - call this method using performSelectorInBackground:withObject:

I think it should be easy to implement. However, I'd like to see similar functionality implemented in the client library.

Aug 26, 2010 at 1:56 PM
I ended up using NSOperation. It was surprisingly simple and seems to work very well.  

Col.

On 26/08/2010, at 9:33 PM, a_litovko <notifications@codeplex.com> wrote:

From: a_litovko

I am also interested in the ability to execute requests asynchronously. For now, I am going to try to implement it myself in the following way:

 - write a method that calls oData service and processes the response. After the response is received, a notification should be sent using postNotificationName:object:userInfo: method of the NSNotificationCenter class. It is possible to use the userInfo dictionary to pass data received from the service;

 - add an observer for the notification. It will extract data from the userInfo dictionary and process it according to my application's logic;

 - call this method using performSelectorInBackground:withObject:

I think it should be easy to implement. However, I'd like to see similar functionality implemented in the client library.