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