aherlambang
aherlambang

Reputation: 14418

Is connectionWithRequest synchronous?

I wanted to know whether doing:

+ (NSURLConnection *)connectionWithRequest:(NSURLRequest *)request delegate:(id < NSURLConnectionDelegate >)delegate

is synchronous or not? doesn't really say in the docs

If it is synchronous then how do I make it async?

Upvotes: 3

Views: 1999

Answers (2)

0x8badf00d
0x8badf00d

Reputation: 6401

Its Asynchronous -

Look at NSURLConnection Class Reference under Tasks - > Loading Data Asynchronously -> + connectionWithRequest:delegate: first method in that list

Upvotes: 3

bitmapdata.com
bitmapdata.com

Reputation: 9600

check out this

documentaion(sendSynchronousRequest:returningResponse:error:):

sendSynchronousRequest:returningResponse:error:

documentaion(sendAsynchronousRequest:queue:completionHandler):

sendAsynchronousRequest:queue:completionHandler:

Upvotes: 0

Related Questions