How to do multipart/form-data post request with Swift?
let Url = String(format: "http://url/ios.php") guard let serviceUrl = URL(string: Url) else { return } let parameterDictionary :[String:String] = ["Episodes" : "http://url/anime/07-ghost.html"] var request = URLRequest(url: serviceUrl) request.httpMethod = "POST" request.setValue("multipart/form-data", forHTTPHeaderField: "Content-Type") request.httpBody = NSKeyedArchiver.archivedData(withRootObject: parameterDictionary) let session = URLSession.shared session.dataTask(with: request) { (data, response, error) in if let response = response { print(response) } if let data = data { do { let json