The DejaVU Framework -- hush 3.1
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

Manual: CLIENT l 1996


[.] [man] man1 man2 man3 man4 man5 man6 man7 man8 man9 manl mann ?

NAME

client - retrieve data using several protocols

SYNOPSIS


The client component provides means to retrieve data over a network using several protocols. The protocols currently supported are HTTP and FILE. The client can be used to retrieve ASCII or binary based documents. It has both a Tcl and a C++ interface, enabling its use in both script and C++ programs.


slide: SYNOPSIS

INTERFACE


The Tcl interface should be installed in the prelude of a session by calling the function init_client(tk) in <extern/client.h>

    urlget <url>         -- returns the body of the document pointed to
                            by <url>
    urlget <url> <file>  -- saves the body of the document pointed to
                            by <url> to <file>
    urlget_tmp <url>     -- returns the name of a temp file, containing the
                            body of the document pointed to by <url>
    urlheader            -- returns the header of the last document
    urltype              -- returns the type of the last document
  

slide: INTERFACE

EXAMPLE


The following script will show the possibilties of the client Tcl interface. It will retrieve the hush homepage a few times using several protocols.

    #!netshell.out
    # retrieve hush home page several times.
  
    # use http and file protocol
    urlget http://www.cs.vu.nl/~hush/
    urlget file:/home/hush/www/index.html
    set contents [urlget http://www.cs.vu.nl/~hush/]
    puts \$contents
  
    # save contents to /tmp/test
    urlget http://www.cs.vu.nl/~hush/ /tmp/test
    #save to a tmp file
    set tmpfile [urlget_tmp  http://www.cs.vu.nl/~hush/]
    puts "Saved to: \$tmpfile"
  
    # print info about transfer 
    puts "Header is: "
    puts [urlheader]        
    puts "MIME type is: "
    puts [urltype]
  

slide: EXAMPLE

SEE ALSO

client(7)

BUGS


Not all MIME types are correctly recognized by the FILE protocol.

Send questions/bugs to bastiaan@cs.vu.nl


[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
09/24/99