HTTP(1)                          User Commands                         HTTP(1)

NAME
       http - HTTP Client program

SYNOPSIS
       http [options] urls ...

       [--benchmark  ]  [--chunk size ] [--compare dir] [--continue] [--cookie
       cookieString] [--data string] [--datafile filename] [--files  fileList]
       [--form  string] [--header 'key: value'] [--host hostName] [--http ver-
       sion]  [--iterations  count]  [--log  logSpec]  [--method  HTTP_METHOD]
       [--nofollow] [--noout] [--password pass] [--poolThreads count] [--range
       byteRanges] [--retries count] [--save dir]  [--showHeaders]  [--single]
       [--timeout seconds] [--threads count] [--user name] [--verbose]

DESCRIPTION
       The  http  command  issues  HTTP  commands to retrieve files from a web
       server.

OPTIONS
       --benchmark
              Output timing results after retrieving URLs.

       --chunk size
              Request that web  server  use  use  transfer  encoding  for  the
              response  and  break  the  response  data  into  chunks  of  the
              requested size. This is an Appweb web server custom  header  and
              will be ignored by other web servers.

       --compare dir
              Compare  the  retrieved files against master copies in dir. Warn
              if any retrieved files are corrupted.

       --continue
              Continue on errors. Default is to stop on the first error.

       --cookie cookieString
              Define a cookie string to send with the request.  Multiple  uses
              okay.

       --data bodyData
              String of raw body data to send with the request. Assumed to not
              be URL encoded.  You cannot use  this  switch  with  either  the
              --datafile or --form switches.

       --datafile filename
              Specifies  a  filename containing the raw body data to send with
              the the request. Assumed to not be URL encoded.  You cannot  use
              this switch with either the --data or --form switches.

       --files fileList
              Retrieve  the  files  in the specified file list.  The format of
              the file is: {GET|POST} URL If using POST, the  line  after  the
              URL  should contain encoded POST data and it should begin with a
              TAB.

       --form formData
              String of body data to send with the request. Assumed to be  URL
              encoded. ie. "name=paul&address=uk".  You cannot use this switch
              with either the --datafile or --form switches.

       --header "key: value"
              Add a custom header to send with the request. Multiple  --header
              switches can be supplied.

       --host name
              Prepend  all  URLs  with  the specified host. For example if '-h
              www.myHost.com:8888" were used with the URL "/index.html",  then
              http will retrieve http://www.myHost.com:8888.

       --http HTTP_VERSION
              Use  the  specified  HTTP protocol. httpVersion should be either
              '0' for HTTP/1.0 or 1 for HTTP/1.1.

       --iterations count
              Retrieve the URLs iterations times.  Useful  for  load  testing.
              This switch can also be abbreviated as -i.

       --log logSpec
              Specify  a  file  to  log  messages.  The syntax is: "--log log-
              Name[,moduleName][:logLevel]".  Level 3 will trace  the  request
              and response headers.

       --method method
              Set  the  HTTP  method.  Values  may be "GET", "PUT", "OPTIONS",
              "TRACE".

       --nofollow
              Don't automatically follow redirects.  Normal  behaviour  is  to
              follow  redirects and reissue the request if the server responds
              with a redirection response (30X response).

       --noout
              Run in quiet mode and do no output. Suppress  tracing  requests.
              This switch can also be abbreviated as -n or as --quiet or -q.

       --password passPhrase
              Specify  a  password  to  send with the request. Requires a user
              name to be also specified via --user.

       --poolThreads count
              Specify the number of pool threads to use. Pool threads are used
              to process callbacks.

       --printable
              Make  binary  output  printable  by printing hex digits for each
              character.

       --range byteRange
              Request that only the specified byte range of data  be  returned
              with  the  response.  This  will  add  a  "Range"  header to the
              request.  The range format   is:   Range:  bytes=n1-n2,n3-n4,...
              where  n1  is  first byte position and n2 is last byte position.
              Multiple --range switches can be supplied.  Examples:

              0-49             first 50 bytes
              50-99,200-249    Two 50 byte ranges from 50 and 200
              -50              Last 50 bytes
              1-               Skip first byte then emit the rest

       --retries retryCount
              Retry failed requests this number of times.

       --save dir
              Saves retrieved files to the specified directory.

       --showHeaders
              Output HTTP headers. Useful for debugging.

       --single
              Single step between requests by pausing for  user  input  before
              proceeding.

       --threads loadThreads
              Number  of  threads  to  use.  Each URL will be retrieved by all
              threads. Useful only for load testing.

       --timeout seconds
              Specifies a timeout to use for each request in seconds.

       --username user
              Specify a user name to send with the request. If a  password  is
              not  specified  via  --password,  the  program will prompt for a
              password (which will not be echoed). The username  and  password
              will  be  sent  with the request according to the authentication
              protocol required by the requested web server and requested doc-
              ument.

       --verbose
              Verbose  mode. Trace activity to stdout. Can by specified multi-
              ple times for more verbose tracing.  This  switch  can  also  be
              abbreviated as -v.

REPORTING BUGS
       Report bugs to dev@embedthis.com.

COPYRIGHT
       Copyright (C) 2003-2009 Embedthis Software.

http                              March 2009                           HTTP(1)