For a GET request I\'ve tried this simple method:
NSString *urlAddress = @"http://example.com/";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLReq
Thanks for you answer Seva. I've made a method out of your code, hope this helps other people :)
//-------------------------------------------------------------------
// UIWebViewWithPost
// init a UIWebview With some post parameters
//-------------------------------------------------------------------
- (void)UIWebViewWithPost:(UIWebView *)uiWebView url:(NSString *)url params:(NSMutableArray *)params
{
NSMutableString *s = [NSMutableString stringWithCapacity:0];
[s appendString: [NSString stringWithFormat:@""
""];
//NSLog(@"%@", s);
[uiWebView loadHTMLString:s baseURL:nil];
}
to use it
NSMutableArray *webViewParams = [NSMutableArray arrayWithObjects:
@"paramName1", @"paramValue1",
@"paramName2", @"paramValue2",
@"paramName3", @"paramValue3",
nil];
[self UIWebViewWithPost:self.webView url:@"http://www.yourdomain.com" params:webViewParams];