Basically I am trying to upload an image using ASIFormDataRequest. This is my following code
ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:urlImg];
[request setRequestMethod:@"POST"];
[request addRequestHeader:@"Content-Type" value:@"application/xml"];
[request setDelegate:self];
[request setTimeOutSeconds:500];
NSData *imageData = UIImagePNGRepresentation([info objectForKey:@"UIImagePickerControllerOriginalImage"]);
[request setData:imageData forKey:@"media"];
[request startAsynchronous];
Basically my app wold crash and give me the following error:
[ASIHTTPRequest setData:forKey:]: unrecognized selector sent to instance 0x8880db0
2010-06-28 12:33:49.803 vdq[7658:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[ASIHTTPRequest setData:forKey:]: unrecognized selector sent to instance 0x8880db0'
Not sure why, but the method setData seems to be in that instance.