[objective-c]NSURLConnection::sendAsynchronousRequest

NSURLConnection::sendAsynchronousRequest

NSURL *url = [NSURL URLWithString:_url];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setHTTPMethod:@"GET"];
[NSURLConnection sendAsynchronousRequest:request queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
    NSLog(@"complete");
    int statusCode = ((NSHTTPURLResponse *)response).statusCode;
    NSLog(@"%d", statusCode );
}];