【发布时间】:2015-02-17 23:00:34
【问题描述】:
这是我的代码:
func submitLacunaRequest (#module: String, method: String, parameters: AnyObject, completion: (responseObject: AnyObject!, error: NSError!) -> (Void)) -> NSURLSessionTask? {
let session = NSURLSession.sharedSession()
let url = NSURL(string: "https://us1.lacunaexpanse.com").URLByAppendingPathComponent(module)
let request = NSMutableURLRequest(URL: url)
request.HTTPMethod = "POST"
request.setValue("application/json-rpc", forHTTPHeaderField: "Content-Type")
调用中的参数“host”缺少参数。 它发生在这一行。
let url = NSURL(string: "https://us1.lacunaexpanse.com").URLByAppendingPathComponent(module)
请问有什么办法解决这个问题吗?
谢谢!
【问题讨论】: