0
    [NSURLConnection sendAsynchronousRequest:request queue:queue  
                           completionHandler:^(NSURLResponse *response,
                            NSData *data, NSError *connectionError) {}

How do I close NSURLConnection if I use sendAsynchronousRequest like that ?

PA.
  • 28,486
  • 9
  • 71
  • 95
user3530550
  • 25
  • 1
  • 6

1 Answers1

4

You can use following method if you have NSURLConnection object

[conn cancel];

Where conn is the NSURLConnection object.

cancel is use to cancel asynchronous load of a request.

But in your case you dont have the object of connection so Please have a look

How can I cancel an asynchronous call through NSURLConnection sendAsynchronousRequest?

I hope this will help you.

Community
  • 1
  • 1
svrushal
  • 1,612
  • 14
  • 25