Changes between Version 3 and Version 8 of Documentation/ARexxAPI/GETURL


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/ARexxAPI/GETURL

    v3 v8  
    1 [[TranslatedPages]]\\
    2 [[TOC(titleindex, heading=ARexx API, notitle, depth=2, Documentation/ARexx API/*)]]
    3 
     1[[TranslatedPages]]
     2[[TOC(sectionindex, heading=ARexx Function List, notitle, depth=1, Documentation/ARexxAPI/)]]
    43== GETURL
    54
    6 '''NAME'''
     5 NAME::
    76     GetURL -- Download a file from the World Wide Web using HTTP. (V2.1)
    87
    9 '''TEMPLATE'''
     8 TEMPLATE::
    109     URL/A,FILENAME/A
    1110
    12 '''FUNCTION'''
     11 FUNCTION::
    1312     Downloads a file from the World Wide Web by HTTP and saves it
    1413     to disk.
    1514
    16 '''INPUTS'''
    17      URL/A        - complete URL to the file\\
    18      FILENAME/A   - complete filename to write the file to\\
     15 INPUTS::
     16     `URL/A`        - complete URL to the file\\
     17     `FILENAME/A`   - complete filename to write the file to\\
    1918
    20 '''RETURNS'''
    21      RC is set to 5 if a TCP/IP stack is not running, or 10 if it is
     19 RETURNS::
     20     `RC` is set to 5 if a TCP/IP stack is not running, or 10 if it is
    2221     actually running but not online, if the URL cannot be found, or
    2322     if the output filename cannot be written to.
    2423
    25 '''NOTES'''
     24 NOTES::
    2625     The "!http://" introducer is optional, but otherwise the only one
    2726     supported.
    2827
    29 '''EXAMPLE'''
    30          /* Enable result codes */
     28 EXAMPLE::
     29     {{{#!arexx
     30     /* Enable result codes */
     31     OPTIONS RESULTS
    3132
    32          OPTIONS RESULTS
     33     /* Ignore possible error from GETURL */
     34     OPTIONS FAILAT 11
    3335
    34          /* Ignore possible error from GETURL */
     36     /* Download a file */
     37     GETURL 'http://yam.ch/files/YAM22.lha' 'RAM:YAM22.lha'
    3538
    36          OPTIONS FAILAT 11
     39     /* Report results */
     40     c = RC
     41     SELECT
     42       WHEN c = 5 THEN SAY 'TCP/IP stack not running.'
     43       WHEN c > 5 THEN SAY 'Error.'
     44       OTHERWISE SAY 'File downloaded successfully.'
     45     END
     46     }}}
    3747
    38          /* Download a file */
    39 
    40          GETURL '!http://yam.ch/files/YAM22.lha' 'ram:YAM22.lha'
    41 
    42          /* Report results */
    43 
    44          c = RC\\
    45          SELECT\\
    46             WHEN c = 5 THEN SAY 'TCP/IP stack not running.'\\
    47             WHEN c > 5 THEN SAY 'Error.'\\
    48             OTHERWISE SAY 'File downloaded successfully.'\\
    49          END\\
    50 
    51 '''BUGS'''
     48 BUGS::
    5249     The command is interrupted if email is sent or received.
    5350
    54 '''SEE ALSO'''
     51 SEE ALSO::