UIWebView带Post请求地址,如果使用Get方式的话,请求的参数直接拼接在Url里面就好。如果是Post方式就需要放在Body里面
NSURL *url = [NSURL URLWithString: @"www.baidu.com"];
NSString *body = [NSString stringWithFormat: @"arg1=%@&arg2=%@", @"val1",@"val2"];
NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL: url];
[request setHTTPMethod: @"POST"];
[request setHTTPBody: [body dataUsingEncoding: NSUTF8StringEncoding]];
[self.webView loadRequest: request];