AFNetworking-RACExtensions
AFNetworking-RACExtensions copied to clipboard
Added NSError category for Reactive programming
Added NSError convenience category, to pull information from NSError instances sent by ReactiveCocoa when requests fail. This is to remove boilerplate code you get when trying to handle specific NSError instance in case of networking failure.
So wait, is this a file from AFNetworking or did you write this yourself?
This is a file I wrote myself when using your library. I submitted it to AFNetworking main repo, but according to owner they do not want to pollute the global namespace with category methods. Usually this is not needed much with main AFNetworking blocks as you get operation which contains these objects on the fly. In this case we only get NSError when subscribed and it is annoying to pull out information from it (some boilerplate code). This category removes that.
Then I have to request some things of you:
- Change the license to MIT. I can't merge anything with the AFN license, it's a hassle.
- Re-namespace everything. I use raf to avoid AFNetworking's stuff
- Adhere to the code style of the rest of the files.
I'll leave more specific notes in line comments.
Okay, I'll update this. Just wondering did you mean "raf" or "rac"? Cause it seems it should be prefixed with rac, not raf.
Hm... Yeah, I meant rac.
Updated, check if all good. :) Thanks.