Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let verse = Alamofire.request(.POST, url, encoding: .JSON)
- .authenticate(user: key, password: key)
- .responseJSON
- { response in switch response.result {
- case .Success(let JSON):
- //print("Success with JSON: \(JSON)")
- let response = JSON as! NSDictionary
- //example if there is an id
- let responseone = response.objectForKey("response")
- let verses = responseone?.objectForKey("verses")
- let text = verses?.objectForKey("text")
- print(responseone)
- case .Failure(let error):
- print("Request failed with error: \(error)")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement