я пробую этот код и отлично у меня работает.
let url = "Your URL"
let JsonString = "Yout JSON Data" // Ex.:- "{\"action\": \"fetch-data\"}"
var request = URLRequest(url: URL(string: url)!)
request.httpMethod = HTTPMethod.post.rawValue
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let pjson = JsonString
let data = (pjson.data(using: .utf8))! as Data
request.httpBody = data
Alamofire.request(request).responseJSON { (response) in
print(response)
}