Changes between Initial Version and Version 1 of Documentation/ARexxAPI/GETURL


Ignore:
Timestamp:
Sep 22, 2013 10:13:25 PM (12 months ago)
Author:
AmigaPhil
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/GETURL

    v1 v1  
     1== GETURL 
     2 
     3'''NAME''' 
     4     GetURL -- Download a file from the World Wide Web using HTTP. (V2.1) 
     5 
     6'''TEMPLATE''' 
     7     URL/A,FILENAME/A 
     8 
     9'''FUNCTION''' 
     10     Downloads a file from the World Wide Web by HTTP and saves it 
     11     to disk. 
     12 
     13'''INPUTS''' 
     14     URL/A        - complete URL to the file\\ 
     15     FILENAME/A   - complete filename to write the file to\\ 
     16 
     17'''RETURNS''' 
     18     RC is set to 5 if a TCP/IP stack is not running, or 10 if it is 
     19     actually running but not online, if the URL cannot be found, or 
     20     if the output filename cannot be written to. 
     21 
     22'''NOTES''' 
     23     The "!http://" introducer is optional, but otherwise the only one 
     24     supported. 
     25 
     26'''EXAMPLE''' 
     27         /* Enable result codes */ 
     28 
     29         OPTIONS RESULTS 
     30 
     31         /* Ignore possible error from GETURL */ 
     32 
     33         OPTIONS FAILAT 11 
     34 
     35         /* Download a file */ 
     36 
     37         GETURL '!http://yam.ch/files/YAM22.lha' 'ram:YAM22.lha' 
     38 
     39         /* Report results */ 
     40 
     41         c = RC\\ 
     42         SELECT\\ 
     43            WHEN c = 5 THEN SAY 'TCP/IP stack not running.'\\ 
     44            WHEN c > 5 THEN SAY 'Error.'\\ 
     45            OTHERWISE SAY 'File downloaded successfully.'\\ 
     46         END\\ 
     47 
     48'''BUGS''' 
     49     The command is interrupted if email is sent or received. 
     50 
     51'''SEE ALSO'''