ASIHTTPRequest code design

Posted by nico on Stack Overflow See other posts from Stack Overflow or by nico
Published on 2009-11-17T12:36:10Z Indexed on 2010/04/07 3:33 UTC
Read the original article Hit count: 470

I'm using ASIHTTPRequest to communicate with the server asynchronously. It works great, but I'm doing requests in different controllers and now duplicated methods are in all those controllers. What is the best way to abstract that code (requests) in a single class, so I can easily re-use the code, so I can keep the controllers more simple. I can put it in a singleton (or in the app delegate), but I don't think that's a good approach. Or maybe make my own protocol for it with delegate callback.

Any advice on a good design approach would be helpful. Thanks.

© Stack Overflow or respective owner

Related posts about asihttprequest

Related posts about iphone