UIWebView加载POST请求
NSURL*url=[NSURLURLWithString:@"http://your_url.com"];
NSString*body=[NSStringstringWithFormat:@"arg1=%@&arg2=%@",@"val1",@"val2"];NSMutableURLRequest*request=[[NSMutableURLRequestalloc]initWithURL:url];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]];
[webView loadRequest:request];
网友评论