I’m seeing differences between Linux and Mac when trying to do a POST with a URLSessionDataTask - it seems like URLRequest.httpBody is ignored on Linux, so POSTs arrive with an empty body.
Was I relying on undefined behaviour, or is this just not yet implemented? The following captures the difference in behaviour: import Foundation import Dispatch var req = URLRequest(url: URL(string: "http://httpbin.org/post")!) req.httpMethod = "POST" req.httpBody = "Hello! You should see me in the 'form' parameter of the result.".data(using: .utf8) let sesh = URLSession(configuration: URLSessionConfiguration.default) let dataTask = sesh.dataTask(with: req) { data, _, _ in print(String(data: data!, encoding: .utf8)!) exit(0) } dataTask.resume() dispatchMain() _______________________________________________ swift-corelibs-dev mailing list swift-corelibs-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-corelibs-dev