[英]reuse AsiHttpRequest credentials to with UIWebView with loadRequest
我正在建立一個ASIHttpRequest來設置憑據。
我的下一步是重用此請求並使用以下命令加載HTML網站:
[webView loadRequest:<#(NSURLRequest *)#>]
但這不適用於ASIHTTPRequest ...
我也嘗試這樣做:
[self.webView loadData:[asiRequestWebView responseData] MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:targetURL];
但仍然無法正常工作。
而且我不能使用ASIWebpageRequest,因為它不是很穩定。
請我有一些想法。
編輯:
@gardenofwine
非常感謝你。 我最終做了你說的話:
[webView loadRequest:[NSURLRequest requestWithURL:[asihttprequest url]]]];
但之前告訴過要求:
asiRequest.useKeychainPersistence = YES;
現在它就像一種魅力一樣,非常感謝!
您能否進一步說明什么完全不起作用,並提供控制台日志? (編譯錯誤,運行時錯誤,崩潰?)
您能解釋一下以下代碼為什么不能滿足您的需求嗎?
[webView loadRequest:[NSURLRequest requestWithURL:[asihttprequest.url]]];
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.