I’d like to know how to retrieve a post value from a finished ASIHTTPRequest.
When I perform the request I do this:
[request setPostValue:uniqueID forKey:@"bookUniqueId"];
NSFileManager *fileManager = [[NSFileManager alloc]init];
if (![fileManager fileExistsAtPath:tempDir]) {
[fileManager createDirectoryAtPath:tempDir withIntermediateDirectories:YES attributes:nil error:nil];
}
[fileManager release];
tempDir = [[tempDir stringByAppendingPathComponent:uniqueID]stringByAppendingPathExtension:@"zip"];
[request setDownloadDestinationPath:tempDir];
[request setDelegate:self];
[request startAsynchronous];
because I want to download the zip file, named like the ID of my book.
In the - (void)requestFinished:(ASIHTTPRequest *)request method I need that ID to unzip the file. I can’t save the ID in an ivar because I want to support multiple asynchronous downloads.
How can I do this? Is there something similar to the inexistent method [request postValueForKey: key] ?
Whenver you create your
ASIFormDataRequestJust set its userinfo and get it like this.For setting user Info use this.
For getting user Info use this.