Authentication for NSURLConnection when not required
I am trying to download a file from google trend. I am using NSURLConnection to get a file.
I want to tell google that I am logged in (i.e. authenticating the connection) so that there are no upload restrictions. I tried using:
- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
The problem is that no login is required , the method is never called. Is there a way to verify the authenticity of the connection? thank!
Note: I've asked this question before here , but I didn't get an answer, so I'm asking again - hope ok
EDIT: Perhaps I can use - (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse
? Is it possible to somehow authenticate through the cache?
+3
source to share