在 mobile safari 中打开 POST 回复
这是我的问题: 我向 www.aaa.com 发出 POST 请求:
NSString *post =[[NSString alloc] initWithFormat:@" bll bla ",importo];
NSURL *url=[NSURL URLWithString:@"http://www.aaa.com"];
NSLog(@"POST: %@",post);
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding
allowLossyConversion:YES];
... bla bla bla....
[request setHTTPBody:postData];
[request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
httpResponse = [[NSMutableString alloc] init];
NSURLConnection *connection = [[NSURLConnection alloc]
initWithRequest:request
delegate:self];
[connection release];
我收到回复,一切正常! 但
- (void) connectionDidFinishLoading:(NSURLConnection *)connection
我想在移动 Safari 中打开响应页面,而不是在 uiwebview 中,可能我必须改变方法,有人有建议吗?
this is my question:
I make a POST requesto to www.aaa.com :
NSString *post =[[NSString alloc] initWithFormat:@" bll bla ",importo];
NSURL *url=[NSURL URLWithString:@"http://www.aaa.com"];
NSLog(@"POST: %@",post);
NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding
allowLossyConversion:YES];
... bla bla bla....
[request setHTTPBody:postData];
[request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
httpResponse = [[NSMutableString alloc] init];
NSURLConnection *connection = [[NSURLConnection alloc]
initWithRequest:request
delegate:self];
[connection release];
i receive a response and all is ok!
but in
- (void) connectionDidFinishLoading:(NSURLConnection *)connection
i want open the response page in mobile safari, not in a uiwebview, probably i must change approach, anyone have suggestion?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你想在 Safari 中打开 URL,请调用:
If you want to open URL in Safari, call: