views:

235

answers:

1

According to the website for ASIHTTPRequest:

If your requests are all of the same broad type, but you want to distinguish between them, you can set the userInfo NSDictionary property of each request with your own custom data that you can read in your finished / failed delegate methods.

How do I set userInfo?

NSURL *url = [NSURL URLWithString:@"http://www.google.com"];
ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url];
[request setDelegate:self];
[request startAsynchronous];
A: 
request.userInfo = [NSDictionary dictionaryWithObjectsAndKeys: dataObject, key, nil];
Hua-Ying