NSURLConnection with blocks

前端 未结 2 907
情书的邮戳
情书的邮戳 2021-02-14 23:57

I\'m using

[NSURLConnection connectionWithRequest:req delegate:self];

and then I use

-(BOOL)connection:(NSURLConnection *)conne         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-15 00:25

    I hope it will be helpful.

    [NSURLConnection sendAsynchronousRequest:request
                                       queue:[NSOperationQueue mainQueue]
                           completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) {
                               NSLog(@"%@", response);
                               NSLog(@"%@", data);
                           }];
    

提交回复
热议问题