【发布时间】:2016-07-27 09:38:32
【问题描述】:
我想登录this link 我的代码是这样的
override func viewDidLoad() {
super.viewDidLoad()
let username = "14-032"
let password = "choi3704"
let loginParameters = ["id": username as String, "pwd": password as String]
Alamofire.request(.POST, "http://students.ksa.hs.kr/scmanager/stuweb/index.jsp", parameters: loginParameters, encoding: .JSON).responseJSON{ response in switch response.result {
case .Success(let JSON):
let response = JSON as! NSDictionary
print(response.objectForKey("type"))
case .Failure(let error):
print("Request failed with error, \(error)")
}
}
}
我得到了
请求失败并出现错误,错误域=NSCocoaErrorDomain Code=3840“字符 8 周围的值无效。” UserInfo={NSDebugDescription=字符 8 周围的值无效。}
我该如何解决这个问题?
【问题讨论】:
标签: swift jsp swift2 alamofire