let urlString: String = ""
varrequest =URLRequest(url:URL(string: urlString)!)
request.httpMethod="POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody=try!JSONSerialization.data(withJSONObject: parameter)
AF.request(request)
.responseJSON{ responsein
switchresponse.result{
case.failure(leterror):
print(error)
ifletdata = response.data,letresponseString =String(data: data,encoding: .utf8) {
print(responseString)
}
case.success(letresponseObject):
print(responseObject)
}
}