HTTPGET

Synopsis

HTTPGET [/?] [/REFERER string] [/HOST string] [/USERAGENT string] [/ACCEPT string] [/PROXY string] [/BYIP[+|-]] [/SRV_SUPERDOMAINS[+|-]] [/SRV_SELF[+|-]] [/IMPLICIT[+|-]] [/IP6ADDR[+|-]] [/CLIENTIP[+|-]] [/CLIENTPORT[+|-]] domain path filename

Description

The HTTPGET command retrives a file from a content HTTP server and stores it in the local file filename.

The URL of the file on the server is http://domainpath. This is because path is defined, by the protocol specification, to always be an absolute path, that begins with a forward slash character.

Note: Because a forward slash is a command-line option character, one must bypass standard option recognition when invoking HTTPGET. Conveniently, the double slash method of doing this is syntactically similar to a URL. For example:

[c:\]httpget // example.com /absolute/path/name localname

HTTPGET sends HTTP/1.1 GET requests. It is capable of supporting both the chunked transfer encoding and the vanilla HTTP/1.0 transfer encoding.

HTTPGET will attempt to preserve file timestamps from the server. If there is a Last-Modified: header in the response, HTTPGET will attempt to set the last modified date of the file to the same value.

HTTPGETN will not touch existing files if they exist, but will issue an error message and abort. It is necessary to manually delete (or rename) any such local file before running HTTPGET.

HTTPGET attaches a description (.SUBJECT) extended attribute to the file comprising the URL from which it was downloaded.

HTTPGET looks up domain to find the content HTTP server to contact. It uses the same DNS lookup process for locating content HTTP servers as the proxy HTTP server dæmon does. It is SRV resource record aware and will respect any such records if found.

By default, domain is also the hostname sent in the GET request.

Command-specific options

/REFERER
Send a Referer: header, with the specified content, in the GET request.
/HOST
Send a Host: header, with the specified content, in the GET request.
/USERAGENT
Send a User-Agent: header, with the specified content, in the GET request.
/ACCEPT
Send a Accept: header, with the specified content, in the GET request.
/PROXY
Connect to a specified proxy HTTP server instead of directly to the content HTTP server. HTTPGET makes no changes to the actual request sent if a proxy server is specified.

The Internet Utilities are © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.