小编李江淮*_*李江淮的帖子

iOS10 NSURLSession HTTP/2无效

NSURLSession请求HTTP/2.0

在iOS9中工作.

在此输入图像描述

但在iOS10中无效

在此输入图像描述

我的代码:

 

    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];

Run Code Online (Sandbox Code Playgroud)

http2 ios10 charles-proxy

2
推荐指数
1
解决办法
893
查看次数

标签 统计

charles-proxy ×1

http2 ×1

ios10 ×1