I wanna log in to this link My code is this
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)")
}
}
}
And I got
Request failed with error, Error Domain=NSCocoaErrorDomain Code=3840 "Invalid value around character 8." UserInfo={NSDebugDescription=Invalid value around character 8.}
How can I solve this problem?