【问题标题】:Custom HTTP headers UIWebview自定义 HTTP 标头 UIWebview
【发布时间】:2012-09-22 11:42:45
【问题描述】:

我正在 Xcode 4.5 中为 iOS 开发应用程序,但我遇到了 UIWebView 的问题。我想设置一个标题(BASE64 代码)来跳过登录部分。当我尝试这个时,使用NPWebView project 时,webview 总是失败,并出现如下错误:
错误 Domain=NSURLErrorDomain Code=-999 “操作无法完成。(NSURLErrorDomain 错误 -999。)” UserInfo=0x6ace650 {NSErrorFailingURLKey="MY URL", NSErrorFailingURLStringKey="MY URL"}

希望有人能帮帮我!

【问题讨论】:

    标签: ios xcode uiwebview http-headers


    【解决方案1】:

    从您的描述中我无法确切知道发生了什么,但根据我的经验,-999 通常来自请求被取消。

    (见https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Miscellaneous/Foundation_Constants/Reference/reference.html#//apple_ref/doc/c_ref/NSURLErrorCancelled

    【讨论】:

      猜你喜欢
      • 2012-01-17
      • 2018-09-26
      • 2011-12-09
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      • 2012-10-02
      • 2011-04-03
      • 2014-08-08
      相关资源
      最近更新 更多