更新时间:2022-12-08 10:21:29
你需要使用这样的方法:
You need to use that method like:
// Creating a data task
NSURLSessionDataTask *dataTask = [[NSURLSession sharedSession]
dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error)
{
// Use the data here
}];
// Starting the task
[dataTask resume];
请检查 dataTaskWithRequest:completionHandler: 了解更多详细信息.
Please check dataTaskWithRequest:completionHandler: for more detailed information.