+ (NSData *) sendGETRequest:(NSString *) url
{
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url]
cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
timeoutInterval:10];
[request setHTTPMethod: @"GET"];
[NSURLConnection sendAsynchronousRequest:request queue:[[NSOperationQueue alloc] init] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error)
{
[Common alertStatus:@"N/A PTZ" :@"System error!"];
}];
}
我想从 Web 服务中获取数据并且我已经使用过sendAsynchronousRequest
,但它没有运行!也许我做错了什么。请帮忙 !!