Answers for "response.result.value alamofire 5"

0

response.result.value alamofire 5

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

            }
    }
Posted by: Guest on June-02-2021

Code answers related to "response.result.value alamofire 5"

Browse Popular Code Answers by Language