Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSURLSessionMBS class.
NSURLSessionMBS.dataTaskWithRequest(request as NSURLRequestMBS) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: A URL request object that provides request-specific information such as the URL, cache policy, request type, and body data or body stream.
Returns he new session data task.
By creating a task based on a request object, you can tune various aspects of the task’s behavior, including the cache policy and timeout interval.
After you create the task, you must start it by calling its resume method.
See also:
NSURLSessionMBS.dataTaskWithRequest(request as NSURLRequestMBS, handler as NSURLSessionDataTaskCompletedMBS, tag as Variant = nil) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: A URL request object that provides the URL, cache policy, request type, body data or body stream, and so on.
completionHandler: The completion handler to call when the load request is complete.
See also:
NSURLSessionMBS.dataTaskWithURL(URL as String) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
URL: The URL to be retrieved.
After you create the task, you must start it by calling its resume method. The task calls methods on the session’s delegate to provide you with the response metadata, response data, and so on.
See also:
NSURLSessionMBS.dataTaskWithURL(URL as String, handler as NSURLSessionDataTaskCompletedMBS, tag as Variant = nil) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The URL to be retrieved.
handler: The completion handler to call when the load request is complete.
See also:
NSURLSessionMBS.downloadTaskWithRequest(request as NSURLRequestMBS) as NSURLSessionDownloadTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: A URL request object that provides the URL, cache policy, request type, body data or body stream, and so on.
Returns the new session download task.
By creating a task based on a request object, you can tune various aspects of the task’s behavior, including the cache policy and timeout interval.
After you create the task, you must start it by calling its resume method. The task calls methods on the session’s delegate to provide you with progress notifications, the location of the resulting temporary file, and so on.
See also:
NSURLSessionMBS.downloadTaskWithRequest(request as NSURLRequestMBS, handler as NSURLSessionUploadTaskCompletedMBS, tag as Variant = nil) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
request: A URL request object that provides the URL, cache policy, request type, body data or body stream, and so on.
Handler: The completion handler to call when the load request is complete.
See also:
NSURLSessionMBS.downloadTaskWithResumeData(resumeData as MemoryBlock) as NSURLSessionDownloadTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
resumeData: A data object that provides the data necessary to resume a download.
After you create the task, you must start it by calling its resume method.
This method is equivalent to the downloadTaskWithResumeData:completionHandler: with a nil completion handler. For detailed usage information, including ways to obtain a resume data object, see that method.
See also:
NSURLSessionMBS.downloadTaskWithResumeData(resumeData as MemoryBlock, handler as NSURLSessionUploadTaskCompletedMBS, tag as Variant = nil) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
resumeData: A data object that provides the data necessary to resume the download.
Handler: The completion handler to call when the load request is complete.
See also:
NSURLSessionMBS.downloadTaskWithURL(URL as String) as NSURLSessionDownloadTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: The URL to download.
After you create the task, you must start it by calling its resume method.
See also:
Some examples using this method:
NSURLSessionMBS.downloadTaskWithURL(URL as String, handler as NSURLSessionUploadTaskCompletedMBS, tag as Variant = nil) as NSURLSessionDataTaskMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Networking | MBS MacFrameworks Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
url: An URL that provides the URL to download.
Handler: The completion handler to call when the load request is complete.
See also:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.