====                                                DISview [737]
http
====

-----------------------------------------------------------------
http URL [options]
_________________________________________________________________

URL - takes the form  http://url_string  or just  url_string.
This string can have authentication data in the front of it and
in this case it takes the form  userid:password@url_string.

Option - binary

Forces binary mode even when the server claims to be sending
plain text. Overrides the default setting.

Option - data packet

This can work with either GET or POST and consists of a single
string which *must* start with '%%' as prefix.

Option - file=filename

The fetched URL is saved as filename.
If no filename follows the  `=', the file isn't saved, but
displayed.

Option - force

The fetched URL is saves, including the header information.

Option - head

Only the header information is fetched.

Option - label

The fetched URL has comment containing the URL appended to the
front of it.

Option - link

View the links.  Turn off the 'view' option.  So, if you use it
with 'file=', put it after that, not before, otherwise you'll
view the whole file.
This option is experimental and will probably be phased out soon.

Option - post

Uses POST (as opposed to the default GET) to request pages from
the server. POST uses a separate data packet to contain the full
data for the request and is most often used for FORMs.

Option - view

The fetched URL is displayed, currently without pausing.

>> Example: http www.wash.demon.co.uk/ file=washome.htm
             will fetch the homepage and save it as washome.htm.
          : http www.wash.demon.co.uk force file=washome.htm
             will fetch the homepage and save it with header info.

Note:
1. YAN won't start an infinite number of sessions. Nine http
   sessions is the default limit, so if the http commands are
   started from a script (as opposed to using the http internal
   script), limit the number of commands accordingly.
2. There is currently a limit of 1024 bytes to the *total* length
   of the URL and, if separate (POST), the data packet.
3. In the absence of 'head' or 'post', GET is assumed.

Filenames:
There are two situations when a new file name will be requested:
1. the file already exists
    This is straight forward and can take three replies:
        a. give it a new name
        b. reply y to overwrite
        c. reply n to abort

2. the file can't be opened
    This is more complex, but the most likely reason to see it
    is when the filename is invalid. We live in the age of long
    file names, but DOS won't admit it. They get truncated and
    sometimes the truncated name is invalid. Whatever, there are
    two replies;
        a. provide a new file name
        b. nothing, which aborts.

In both situations, if a filename is entered it is checked
for the original problem (in the first case for validity as
well), and will loop until one of the legal replies is entered.
Files will normally go in the cwd, but can be placed in the
~/cache dir with %s, eg with a reply of %s/newfile.zip.

-----------------------------------------------------------------
http @scriptname [options]
_________________________________________________________________

Starts an http session and fetches the URLs contained in the script.
Any options affect all URLs held in the script. Alternatively, each
URL can have its own options.

A script consisting of a list of URLs which will be processed in a
single window, one after each other. If one of these URLs stalls,
RESET n (where n is the http session number) will stop that one and
move the session on to the next.

>> Example: http @web.scr
            will start an http session and action the contents of
           web.scr, one at a time. If web.scr consists of:
                   www.wash.demon.co.uk/
                   www.wash.demon.co.uk/tw file=textwin.htm
                   www.wash.demon.co.uk.tw/bin/tinytw.exe
           the session will:
                1. open and fetch the homepage, saving it
                   under the default name.
                2. fetch the /tw page and save it under the
                   name textwin.htm.
                3. fetch tinytw.exe amnd save it under that name.

Comments - #

If the line starts with a # character, that line will be ignored,
but displayed. If the last line of a script is a comment line, an
error code is generated and the session will pause.

-----------------------------------------------------------------
 Error codes:
-----------------------------------------------------------------


	Code	Meaning
	1	General catchall
	2	Authentication error
	3	Too many sessions
	4	Neither a URL nor a script
	5	Unable to create a socket
	6	Invalid host
	7	Internal error
	8	Session failure
	9	File overwrite refused

The way it should work, if the fetch was clean or, if running a
script the last fetch was clean, the http session will end. If
there was an error with the fetch or, if running a script there
was an error with the last fetch, the http session will pause
with the error code displayed and, hopefully, some other griff
which will indicate the problem.
