請任何一個知道abhout如何發送請求,並在ASIHTTP發送文件的一些參數,我的代碼是波紋管我不能夠將文件發送ASIHTTP請求
NSURL *audiourl = [NSURL URLWithString:@"http://dev.kuwait.tt/demo_radioapps/radio_mobile/adduserrequest.php?program_id=3&user_name=abhishek&[email protected]&audiofile=review.caf&mode=AddRequest"];
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:audiourl];
[request addData:tempData withFileName:@"review.caf" andContentType:@"audio/caf" forKey:@"audiofile"];
[request setRequestMethod:@"POST"];
[request setDelegate:self];
[request startSynchronous];
這是不好的形式發送請求同步。您應該異步發送它以防止UI被鎖定。 – jmstone617 2012-04-21 16:31:52