This class wraps any HTTP request networking. You can use any kind of networking lib (AFNetworking or your custom or favorite network lib) inside the class.
- (void)sendHttpRequest:(NSURLRequest *)request completion:(MTNetworkWrapperRequestCompletionBlock)completionsend URL request with given request and handle completion block.
typedef void (^MTNetworkWrapperRequestCompletionBlock)(id rawData, NSError *error)completion block has two params: rawData and error.
- Copy files from Classes into your project and include
MTNetworkWrapper.h. - Go to
Build Phasesand add flag-fno-objc-arcforJSONKit.minCompile Sources.
See DemoAppTests.m