urltaskcancel
urltaskcancel

The urltaskcancel statement aborts a download initiated with the urltask( function.

Parameters

No parameters.

Description

This statement aborts a download initiated with the urltask( function. Suppose you have created a task to download a big PDF file.

    fileglobal taskid,urldata
    taskid = urltask("http://www.somesite.com/bigfatlong.pdf",
        "file","~/User/Documents/bigfatlong.pdf")

This file may take a minute or two to download. To cancel this download before it finishes, use this procedure.

    urltaskcancel taskid

Note: If the task has already completed, this statement will result in an error. You can trap this with `if error` if you just want to punt (see Error Handling).

See Also

- encodehttppostdata( -- converts a dictionary into HTTP post data.
- info("httpheaders") -- returns a dictionary with information about a just completed HTTP download.
- info("urltaskinfo") -- returns information about a just completed HTTP download.
- ipaddress -- returns the current IP address of the computer, or "" if not connected.
- loadurl -- loads a resource from the internet.
- loadurl( -- loads a resource from the internet.
- posturl -- loads a resource from the internet, with form data.
- posturl( -- loads a resource from the internet, with form data.
- url( -- synchronously loads a resource from the internet.
- urltask( -- asynchronously loads a resource from the internet.
- urltaskstatus -- enables connection error checking in urltask( completion code.
- zipinfo -- queries the web to obtain information about a zip code.
- zipinfoplus -- queries the web to obtain information about a zip code.

History

Version | Status | Notes
10.0 | New | New in this version.