开发者

iphone use of the following function

开发者 https://www.devze.com 2023-03-07 11:42 出处:网络
i am a beginner in iphone programming ,i found the following code on a site but dont know the function of the code can anyone please explain the function of the code. according to my view it might be

i am a beginner in iphone programming ,i found the following code on a site but dont know the function of the code can anyone please explain the function of the code. according to my view it might be the code for picking a file from a location to upload it onto server. is this so?

ASIFormDataRequest *request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease];  

[request setPostValue:@"Ben" forKey:@"first_name"];  

[request setPostValue:@"Copsey" for开发者_如何转开发Key:@"last_name"];  

[request setFile:@"/Users/ben/Desktop/ben.jpg" forKey:@"photo"];  


It looks like it makes use of the ASIHTTPRequest framework. It's part of a setup to make a http post request setting some parameters.


you are right!

this code will execute an HTTP POST with two form data fields and a file to upload.


Have a look at this. It might help you :

ASIFormDataRequest


These values might be used to pass as a parameter to some HTTP POST Request.

0

精彩评论

暂无评论...
验证码 换一张
取 消