downloadFromUrl(url) Last updated: 30. May 2026

Downloads text from specified URL.

See also: downloadFromUrl64 httpGet

Parameters

Name Type Description
url string

URL to call with HTTP GET.

Returns

Returns downloaded string.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#{
    var text = docly.downloadFromUrl("https://example.com/data.txt");
    docly.print(text);
}#

Output

The #JS code above produces the output shown below:
Only works in API functions, no demo.