@@ -297,7 +297,7 @@ open class URLSession : NSObject {
297
297
}
298
298
299
299
/* Creates an upload task with the given request. The body of the request is provided from the bodyData. */
300
- open func uploadTask( with request: URLRequest , fromData bodyData: Data ) -> URLSessionUploadTask {
300
+ open func uploadTask( with request: URLRequest , from bodyData: Data ) -> URLSessionUploadTask {
301
301
let r = URLSession . _Request ( request)
302
302
return uploadTask ( with: r, body: . data( createDispatchData ( bodyData) ) , behaviour: . callDelegate)
303
303
}
@@ -433,10 +433,10 @@ extension URLSession {
433
433
*/
434
434
open func uploadTask( with request: URLRequest , fromFile fileURL: URL , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
435
435
let fileData = try ! Data ( contentsOf: fileURL)
436
- return uploadTask ( with: request, fromData : fileData, completionHandler: completionHandler)
436
+ return uploadTask ( with: request, from : fileData, completionHandler: completionHandler)
437
437
}
438
438
439
- open func uploadTask( with request: URLRequest , fromData bodyData: Data ? , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
439
+ open func uploadTask( with request: URLRequest , from bodyData: Data ? , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
440
440
return uploadTask ( with: _Request ( request) , body: . data( createDispatchData ( bodyData!) ) , behaviour: . dataCompletionHandler( completionHandler) )
441
441
}
442
442
0 commit comments