browser_cancel_download
POST /api/execute/browser_cancel_downloadAborts an ongoing file transfer immediately, closes the underlying network read socket, and removes any partial temporary data on disk. Routing the cancellation requires both the owning session handle—so the dispatcher targets the correct isolated worker process—and the specific transfer identifier assigned when the download started. Upon receipt, the native CEF download item invokes its cancel callback. It then sends a TCP reset or HTTP/2 termination frame to the remote server and transitions the record's state to `cancelled` inside the session ledger. Invoking this command on a transfer that has already finished or terminated earlier returns cleanly without deleting finalized archives, corrupting completed files, or raising an exception to the client controller during cleanup routines and teardown phases.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| context_id | string | no | Session handle that owns the active file transfer in multi-process execution environments. |
| download_id | string | yes | Identifier of the in-progress download item to terminate and clean up. |
Usage
result = await browser.cancel_download(download_id="value")