Hi,
I'm trying to do an asynchronous request with ASIHTTPRequest, but have some problem getting notified when the request is done.
-(void)doDownload{
NSURL *url = [NSURL URLWithString:@"http://www.someurl.com/?"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"someValue" forKey:@"someField"];
[request setRequestMethod:@"POST"];
[request setDelegate:self];
[request setDidFinishSelector:@selector(requestFinished)];
[request startAsynchronous];
}
- (void)requestFinished:(ASIHTTPRequest *)request
{
// Use when fetching text data
NSString *responseString = [request responseString];
}
requestFinished is never called. I get an exception in ASIHTTPRequest.m, -handleStreamCompleted:
if (fileError) {
[self failWithError:fileError];
} else {
[self requestFinished]; <----- this call fails
}
Any clues?