Asynchronous request

suggest change

NSURLConnection is deprecated. Prefer URLSession. The delegate callbacks are delivered on the run loop of the thread that starts the connection, so create it on the main thread (or another thread that is running a run loop).

// Create the request instance.
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]];
 
// Create url connection and fire request
NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents