startDownload(using:completionHandler:)
Starts to download the resource at the URL in the request.
Declaration
func startDownload(using request: URLRequest, completionHandler: @escaping @MainActor @Sendable (WKDownload) -> Void)func startDownload(using request: URLRequest) async -> WKDownloadParameters
- request:
An object that encapsulates a URL and other parameters that you need to download a resource from a webpage.
- completionHandler:
A closure the system executes when it has started to download the resource.
Discussion
To receive progress updates, set the delegate of the download object in the completion handler.