- iOS 5.0 or later.
- ARC
-
ISNetwork/
ISNetwork objects. -
ISNetworkTests/
unit test objects. -
DemoApp/
objects for sample application.
- add files in
ISNetwork/
andNSDictionary-URLQuery/
to your xcode project. - import ISNetwork
#import "ISNetwork.h"
- set up NSURLRequest
NSURL *URL = [NSURL URLWithString:@"http://www.github.com"];
NSURLRequest *reqeust = [NSURLRequest requestWithURL:URL];
- send request
[ISNetworkClient sendRequest:request
handler:^(NSHTTPURLResponse *response, id object, NSError *error) {
if (error || response.statusCode != 200) {
// error
return;
}
// completion
}];
use previous version.