@@ -318,7 +318,7 @@ open class URLSession : NSObject {
318
318
}
319
319
320
320
/* Creates an upload task with the given request. The body of the request is provided from the bodyData. */
321
- open func uploadTask( with request: URLRequest , fromData bodyData: Data ) -> URLSessionUploadTask {
321
+ open func uploadTask( with request: URLRequest , from bodyData: Data ) -> URLSessionUploadTask {
322
322
let r = URLSession . _Request ( request)
323
323
return uploadTask ( with: r, body: . data( createDispatchData ( bodyData) ) , behaviour: . callDelegate)
324
324
}
@@ -457,10 +457,10 @@ extension URLSession {
457
457
*/
458
458
open func uploadTask( with request: URLRequest , fromFile fileURL: URL , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
459
459
let fileData = try ! Data ( contentsOf: fileURL)
460
- return uploadTask ( with: request, fromData : fileData, completionHandler: completionHandler)
460
+ return uploadTask ( with: request, from : fileData, completionHandler: completionHandler)
461
461
}
462
462
463
- open func uploadTask( with request: URLRequest , fromData bodyData: Data ? , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
463
+ open func uploadTask( with request: URLRequest , from bodyData: Data ? , completionHandler: @escaping ( Data ? , URLResponse ? , NSError ? ) -> Void ) -> URLSessionUploadTask {
464
464
return uploadTask ( with: _Request ( request) , body: . data( createDispatchData ( bodyData!) ) , behaviour: . dataCompletionHandler( completionHandler) )
465
465
}
466
466
0 commit comments