iOS Swift - Networking
Identify the error in this Swift code for sending a POST request with JSON body:
var request = URLRequest(url: URL(string: "https://api.example.com")!) request.httpMethod = "POST" let json = ["key": "value"] request.httpBody = try? JSONSerialization.jsonObject(with: json)
