Library: ASIHTTPRequest

We’re not quite sure how we managed to overlook this so far, but if you’re outgrowing NSConnection and figure that you need something CFNetwork based, there is an excellent library called ASIHTTPRequest that wraps it nicely, is compatible with iPhone and desktop both, and has plenty of features, some of the more nifty being:

Yes, that is indeed a comprehensive feature list. Source on github; group on Google; and Lighthouse bug base even. And BSD-licensed to boot. Why, it’s like an awesome sundae topped with awesome sauce!

[UPDATE: But ho! The very next day, we stumble across a purported good reason to NOT use it —

I’m sorry, I have to speak out against the ASIHTTP library. It’s mostly quite good, but because it doesn’t sit on the NSURL* classes it ignores any global proxy settings. This is particularly an issue in a VPN environment, but it comes up in other situations as well. Unless you’re willing to deal with wonky support issues (and bad reviews as a result), don’t use it.

Hmmm. That does sound like a worry … but we could swear that CFNetwork can use CFProxySupport to get the global proxy settings, because we’ve done that. On the desktop, mind you. Perhaps CFProxySupport is not available/functional on the iPhone? Or this fellow is just making stuff up? If you have some actual iPhone experience to know one way or the other, please share!]

Alex | March 20, 2010

Leave a Reply