NSURLSession Request HTTP/2.0
working in iOS9.
but invalid in iOS10
my code :
NSURLSession *session = [NSURLSession sharedSession];
request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://ga.seeyouyima.com/page"]];
[request setHTTPMethod:@"POST"];
[[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (completedBlock) {
completedBlock(data, response, error);
}
}] resume];