Skip to content

Instantly share code, notes, and snippets.

@DomiR
Created August 27, 2013 14:13
Show Gist options
  • Save DomiR/6354068 to your computer and use it in GitHub Desktop.
Save DomiR/6354068 to your computer and use it in GitHub Desktop.
NSURL *originalUrl=[NSURL URLWithString:@"http://YourURL.com"];
NSData *data=nil;
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:originalUrl cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10];
NSURLResponse *response;
NSError *error;
data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
NSURL *LastURL=[response URL];
[request release];
[error release];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment