POST REST-Web-Service Call for iPhone application
Anyone have idea how to pass开发者_JS百科 value from iPhone application to the REST-Webservice using POST method.?
ex: http://mysite.com/services/updatescore/uid=1234&score=12658
I want to send this information using POST request. - How can I do it.?
Thanks.
I use ASIHTTPRequest
ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
[request setPostValue:@"Ben" forKey:@"first_name"];
[request setPostValue:@"Copsey" forKey:@"last_name"];
[request setFile:@"/Users/ben/Desktop/ben.jpg" forKey:@"photo"];
See http://allseeing-i.com/ASIHTTPRequest/How-to-use for more info
精彩评论