NSURLConnection is run many times

前端 未结 4 705
刺人心
刺人心 2020-12-09 06:43

I connect asynchronously with server each 5 seconds. The URL is the same, but POST-body is changed each time. Now I create NSURL, NSURLRequest and NSURLConnection from the s

4条回答
  •  Happy的楠姐
    2020-12-09 07:16

    make a method that returns a request and do

    NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:[self requestMethod] delegate:self];
    

    ?

提交回复
热议问题