Skip to content

Commit d89fbef

Browse files
authored
Update NSURLSession.swift
1 parent 2d80441 commit d89fbef

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
@@ -297,7 +297,7 @@ open class URLSession : NSObject {
297297
}
298298

299299
/* 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 {
301301
let r = URLSession._Request(request)
302302
return uploadTask(with: r, body: .data(createDispatchData(bodyData)), behaviour: .callDelegate)
303303
}
@@ -433,10 +433,10 @@ extension URLSession {
433433
*/
434434
open func uploadTask(with request: URLRequest, fromFile fileURL: URL, completionHandler: @escaping (Data?, URLResponse?, NSError?) -> Void) -> URLSessionUploadTask {
435435
let fileData = try! Data(contentsOf: fileURL)
436-
return uploadTask(with: request, fromData: fileData, completionHandler: completionHandler)
436+
return uploadTask(with: request, from: fileData, completionHandler: completionHandler)
437437
}
438438

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

0 commit comments

Comments
 (0)