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)completion
send 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 Phases
and add flag-fno-objc-arc
forJSONKit.m
inCompile Sources
.
See DemoAppTests.m