how i get the URL inside the following method ??
- (void)connectionDidFinishLoading:(NSURLConnection*)theConnection
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You ought to be able to do
theConnection.request.URL, but you can’t. Annoying, isn’t it?The simplest way is to just save the URL (or the whole NSURLRequest) that you were loading. If you’re using multiple connections, you can store them in a dictionary. Note that
-[NSMutableDictionary setObject:forKey:]copies keys, and NSURLConnections are not copyable; the workaround is to use CFDictionarySetValue instead: