I am trying get data from server to store locally when needed. The data is present at different api urls. I want to call all those apis on a single refresh click.Kindly help me to solve this.
-(void) call:(NSString *)url{
NSURLRequest *Request1 = [NSURLRequest requestWithURL :[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:30.0];
// calling only one api
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:Request1 delegate:self startImmediately:YES];
// flag = true;
[SVProgressHUD showWithStatus:@"Wait while we fetch data .."];
if (connection){
NSLog(@"connection success");
}
else{
// handle error here
}
}