ASIHTTPRequest vs AFNetworking vs NSUrlRequest

afnetworking, ios, iphone

Solution

`NSURLConnection` and `NSURLRequest` are the provided Cocoa classes for managing connections. In iOS 7, Apple added `NSURLSession`.

But I think you'll find `AFNetworking` to be a framework that further simplifies network requests (notably complex HTTP requests). If you don't want to use third-party frameworks for any reason, you can use `NSURLConnection` and/or `NSURLSession` directly. It just takes a little more coding.

If you're looking for a good `ASIHTTPRequest` alternative, `AFNetworking` is a great candidate.

For information on `NSURLConnection` and `NSURLSession` see the URL Loading System Programming Guide.

Problem

In the past I have use `ASIHTTPRequest` but now there is `NSURLRequest`. Should we be using the `NSURLRequest` now? Are there any disadvantages? For people reading this now: I ended up using `AFNetworking` as mentioned in the answers https://github.com/AFNetworking/AFNetworking Thanks,

Original source