9

Some people strongly prefer asihttprequest ASIHTTPRequest vs NSURLConnection

Reasons can be listed (not full)

  • a lot of extra features,such as supporting cache,http proxy etc
  • also based on CFNetwork , coming from ImageClient

But also there are a lot of bugs. NSURLConnection and NSHttpConnection are from iOS SDK, maybe have fewer bugs.

From ASIHTTPRequest vs NSURLConnection we can see that asihttprequest does not have better performance than nsurlconnection.

A very good paper Accessing The Cloud From Cocoa Touch

So question here is what differences do you think more ?

And what is your consideration to choose ?

1 Answer 1

5

Your link is comparing an very old version of ASIHTTPRequest - http://allseeing-i.com/ASIHTTPRequest-1.5 has more recent stats.

I'm finding it difficult to say much without repeating much of what I already said on ASIHTTPRequest vs NSURLConnection.

I've seen bugs in both NSURLConnection and ASIHTTPRequest; the advantage of ASIHTTPRequest was that I could fix the bugs in it! (Ben is good at merging in fixes to the mainline, and also very good at fixing bugs reported to him - though I have yet to take advantage of the latter :-) ).

Depending on your app, you may also have to write a lot of code on top of NSURLConnection if you decide to use it (eg. if you need caching), going through the full design/code/test/debug cycle - or you can use ASIHTTPRequest, which has a built in caching layer that's already been tested & debugged.

I think I'd look at the question a different way: If you use ASIHTTPRequest, you have an awful lot of flexibility and power available to you - is there any good reason to build an app using NSURLConnection?

1
  • ASIHTTPRequest is no more reliable and is being abandoned in iOS 5. They have improved NSURLConnection/NSURLRequest.
    – Saleh
    Jan 4, 2012 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.