iOS 开发

webView加载中POST

2016-06-21  本文已影响0人  乱世道人

示例代码

urlString = [NSString stringWithFormat:@"%@%@",BASEURL,self.uid];

NSURL  * url = [NSURL URLWithString:urlString];

NSString * body = [NSString stringWithFormat:@"token=%@",token];

NSMutableURLRequest * request = [[NSMutableURLRequest alloc] initWithURL:url];

[request setHTTPMethod:@"POST"];

[request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]];

[webView loadRequest:request];

上一篇 下一篇

猜你喜欢

热点阅读