Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is RESTKit a good replacement for ASIHTTPRequest?

I have been using ASIHTTPRequest for quite a while now and i quite satisfied with it. However since it has been deprecated, I am considering replacing it. My first though was to go with the NSURLConnection, but I found out that ASIHTTPRequest actually does quite a lot. For example I like its queue handling.

The iPhone application that I am working on uses a REST API, so I have been considering RESTKit. Is is possible to use RESTKit without Core Data? As it is know I have pure dataobjects and I do not want to use Core Data, not right now anyway.

Are there any other good alternatives to ASIHTTPRequest?

BTW I know that there is a similar question but this is more specific.

like image 568
Johan Karlsson Avatar asked Jan 19 '12 07:01

Johan Karlsson


2 Answers

I think that AFNetworking is a good solution.

Pros:

  • Small
  • Well documented
  • Simple to install, only copy the source code into your project.
  • Simple to use.
  • An excellent category for UIImageView for loading icons in the background.

Cons:

  • No way of setting the timeout for requests. (Applies to v0.9.0)
like image 144
Johan Karlsson Avatar answered Nov 18 '22 03:11

Johan Karlsson


I can definitely recommend RestKit, I make use of it a lot! It handles common stuff for you and no, you don't have to use Core Data. RestKit can work with it, but that is just a nice feature. A good starting point for using RestKit is the wiki on github.

RestKit relies on AFNetworking as a networking framework. If RestKit seems to be an overkill, you may want to try only this one.

like image 28
tilo Avatar answered Nov 18 '22 03:11

tilo