I am able to send post data as json fine from swift using this code:
private func alamoFireAjax(url: String, parameters: Parameters, callback: @escaping (DataResponse<Any>) -> Void) {
Alamofire.request(url, method: .post, parameters: parameters, encoding: JSONEncoding.default).responseJSON(completionHandler: callback)
}
But I want to send a image along with the data that this function is sending. How do I do that in alamofire, or do I need a different framework.