Alamofire 4.0 Upload MultipartFormData Header Alamofire 4.0 Upload MultipartFormData Header ios ios

Alamofire 4.0 Upload MultipartFormData Header


I got the solution.

Alamofire.upload(multipartFormData:{ multipartFormData in         multipartFormData.append(unicornImageURL, withName: "unicorn")         multipartFormData.append(rainbowImageURL, withName: "rainbow")},       usingThreshold:UInt64.init(),       to:"https://httpbin.org/post",       method:.post,        headers:["Authorization": "auth_token"],        encodingCompletion: { encodingResult in        switch encodingResult {        case .success(let upload, _, _):            upload.responseJSON { response in                debugPrint(response)            }        case .failure(let encodingError):            print(encodingError)        }    })

Hope it will help you.


matomo