I use Ben Copsey subclasses ASIHTTPRequestvery much for the web service client that I hope to finish in the next couple of weeks. This is a great project, and his work saved me a lot of time and effort.
I have ASINetworkQueueinstalled in the application deletion. The queue is sent -goso that it is ready to receive requests. I add my subclasses to this queue. Each request is processed and issues notifications, and my view controller processes the corresponding response data.
What I did is subclass ASIHTTPRequestand:
- Set up the method
-init(or -initWithParams:method, depending on the request) - Override
-requestFailed:and -requestCompleted:to handle HTTP error messages returned from the web service NSNotification, -requestCompleted:
, . .
NSNotification UIAlertView, , - , (, ), HTTP.
, -release , .