Commonly used frameworks such as: Afnetworking,asihttprequest,sdwebimage,mknetworkkit and so on.
IOS5 has been out so long, and asihttprequest the author has affirmed that not updated, in the IOS5 environment, in fact, there are some problems.
Now Mknetworkki absorbs the advantages of asihttprequest and afnetworking, and joins its own unique functions.
Download: GitHub Address: Https://github.com/MugunthKumar/MKNetworkKit.git Official instructions for use:http://blog.mugunthkumar.com/products/ios-framework-introducing-mknetworkkit/
GitHub downloaded the project, if you want to run its demo, be sure to open mknetworkkit.xcworkspace the file, if opened separately, the compile will prompt the missing LIBMKNETWORKKIT-IOS.A file!!!
Installation method
Installation
The preferred-installation is via CocoaPods. Just add
' Mknetworkkit '
and run pod install . It'll install the most recent version of Mknetworkkit.
If you would the latest code of Mknetworkkit use:
: Head
After successful installation
Implementing a GET Request
1 mknetworkengine *engine = [[ Mknetworkengine alloc] initwithhostname:@ "www.weather.com.cn" customheaderfields:nil]; Mknetworkoperation *op = [engine operationwithpath:@ "/data/sk/101010100.html" Params:nil httpmethod:@ "GET" Ssl:NO]; [Op addcompletionhandler:^ (mknetworkoperation *operation) { 2 NSLog (@ "[Operation responsedata]- ->>%@ ", [Operation Responsestring]); 3 }errorhandler:^ (mknetworkoperation *errorop , nserror* err) { 4 NSLog (@ "Mknetwork req Uest error:%@ ", [err localizeddescription]); 5 6 [engine enqueueoperation:op];
iOS Web Development mknetworkkit