我无法使用post方法,这就是为什么我不加载网站
let url = URL(string: "\(Application.PROTOCOL)\(Application.DOMAIN)/index.php?loc=aaaaa")
let body = "key=\(Application.KEY)&token=\(Application.TOKEN)"
var request = URLRequest(url: url!)
print("request: \(request)")
request.httpMethod = "POST"
request.httpBody = body.data(using: String.Encoding.utf8, allowLossyConversion: true)
self.webView.load(request as URLRequest)
URLCache.shared.removeAllCachedResponses()
得到了这个:
Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service