downloadTaskWithRequest method
NSURLSessionDownloadTask
downloadTaskWithRequest(
- NSURLRequest request, {
- required ObjCBlock<
Void Function(NSURL?, NSURLResponse?, NSError?)> completionHandler,
downloadTaskWithRequest:completionHandler:
Implementation
NSURLSessionDownloadTask downloadTaskWithRequest(
NSURLRequest request, {
required objc.ObjCBlock<
ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)
>
completionHandler,
}) {
objc.checkOsVersionInternal(
'NSURLSession.downloadTaskWithRequest:completionHandler:',
iOS: (false, (7, 0, 0)),
macOS: (false, (10, 9, 0)),
);
final _ret = _objc_msgSend_r0bo0s(
this.ref.pointer,
_sel_downloadTaskWithRequest_completionHandler_,
request.ref.pointer,
completionHandler.ref.pointer,
);
return NSURLSessionDownloadTask.castFromPointer(
_ret,
retain: true,
release: true,
);
}