Alex Rivera | Logout

Creating multiple NSURLConnections. How to identify which Async call

Asked 2009-09-12T18:53:49.810
10

I am intending to create 2 requests using NSURLConnection. When the server responds and calls connectionDidFinishLoading it passes in the connection as the parameter, but how do I identify which connection is passed in?

Edit
Report

1 Answer

0

Please do not refer https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html

GO to the NSURLConnection.h file and you will find the following.

When created, an NSURLConnection performs a deep-copy of the NSURLRequest. This copy is available through the -originalRequest method. As the connection performs the load, this request may change as a result of protocol canonicalization or due to following redirects. -currentRequest can be used to retrieve this value.

Ultimately [connection currentRequest].URL absoluteURL might help.

Regards, PRASANNA.

answered 2012-06-03T17:44:26.613

Your Answer