📌  相关文章
📜  response.result.value alamofire 5 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:49.792000             🧑  作者: Mango

代码示例1
Alamofire.request("https://jsonplaceholder.typicode.com/todos/1", method: .get)
        .responseJSON { (response) in

            switch response.result {
            case .success(_):
                if let JSON = response.result.value as? [String: Any] {
                    let status = JSON["completed"] as! Bool
                    print(status)
                }



            case .failure(_): break

            }
    }