Skip to content

Commit 31ce31b

Browse files
authored
Merge pull request #641 from 0xpablo/patch-1
2 parents db54d31 + d89fbef commit 31ce31b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Foundation/NSURLSession/NSURLSession.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ open class URLSession : NSObject {
318318
}
319319

320320
/* 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 {
322322
let r = URLSession._Request(request)
323323
return uploadTask(with: r, body: .data(createDispatchData(bodyData)), behaviour: .callDelegate)
324324
}
@@ -457,10 +457,10 @@ extension URLSession {
457457
*/
458458
open func uploadTask(with request: URLRequest, fromFile fileURL: URL, completionHandler: @escaping (Data?, URLResponse?, NSError?) -> Void) -> URLSessionUploadTask {
459459
let fileData = try! Data(contentsOf: fileURL)
460-
return uploadTask(with: request, fromData: fileData, completionHandler: completionHandler)
460+
return uploadTask(with: request, from: fileData, completionHandler: completionHandler)
461461
}
462462

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 {
464464
return uploadTask(with: _Request(request), body: .data(createDispatchData(bodyData!)), behaviour: .dataCompletionHandler(completionHandler))
465465
}
466466

0 commit comments

Comments
 (0)