Creating multiple NSURLConnections. How to identify which Async call

后端 未结 5 1702
借酒劲吻你
借酒劲吻你 2021-02-06 02:05

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 d

5条回答
  •  囚心锁ツ
    2021-02-06 02:41

    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.

提交回复
热议问题