if i use ASIHTTPRequest the first time , with asynchroun mode , i recive result and error in
- (void)requestFinished:(ASIHTTPRequest *)request
and the error in- (void)requestFailed:(ASIHTTPRequest *)request
but what if I make another query asynchronously? I will receive the result in the same method? how to know if this is the result of the first query or second? I tryed to change the delegate but it don’t work
-(void)getCities
{
NSString * myURLString = [NSString stringWithFormat:@"http://localhost:8080/Data/resources/converter.city/CountryCode/%@",choosedCodeCity];
NSURL *url =[NSURL URLWithString:myURLString];
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setDelegate:resultCities];
[request startAsynchronous];
}
-(void)resultCities :(ASIHTTPRequest *)request
{
}
you can do:
in other words, you do not have to use the default “requestFinished:” and “requestFailed:” methods on the delegate.