In iOS 5 [NSURLConnection originalRequest] works fine, however in iOS 4 it throws an exception:
-[NSURLConnection originalRequest]: unrecognized selector sent to instance 0x65609a0
It seems like the iOS 4.3 SDK doesn’t have a originalRequest method.
What can I use instead to get a NSURLConnection‘s original request in iOS 4?
What I did was this: I created a
NSString *origiOS4and if the running OS is iOS4 then I initialize the string and give it the urls value. In theconnection:didReceiveData:method then, I read the value fromorigiOS4.