HTTP Download Action
<AMHTTPDOWNLOAD URL="text" FILENAME="text" OVERWRITE="yes/no" RESULTVARIABLE="text" PORT="number" TIMEOUT="number" USERNAME="text" PASSWORD="text" PROXYTYPE="text [options]" PROXYSERVER="text" PROXYPORT="text" PROXYUSERNAME="text" PROXYPASSWORD="text">
Downloads a file using the HTTP protocol from the specified URL (example: http://www.networkautomation.com/index.htm) optionally populating a variable with the text contents of the file.
Useful when data or a file must be downloaded via the HTTP protocol and HTML does not need to be rendered inside an external browser. File data can be saved to a file and put into a variable for further processing.
Specifies a URL (uniform resource locator) which points to a file at a valid address. The file at the specified address will be downloaded.
Specifies a valid path and filename to save the file that is downloaded.
If set to YES, specifies that, if files already exist locally, they should be overwritten.
Specifies whether cookies should be blocked during transmission. HTTP cookies are used for authenticating, session tracking (state maintenance), and maintaining specific information about users. If "yes", AutoMate will not store cookies.
NOTE: Blocking cookies might make some websites unusable.
Specifies a previously created variable to populate with the data from the downloaded file.
Causes an attempt authenticate with the server first. Specifies the user name to be used during the authentication. This parameter is available only if the Authenticate check box is enabled.
Causes an attempt authenticate with the server first. Specifies the password to be used during the authentication. If created in visual mode, this value is automatically encrypted. This parameter is available only if the Authenticate check box is enabled.
Sometimes it's necessary for a web site to understand how it is being viewed, so most user agents identify themselves by sending a User Agent String to the web site. The User-Agent request-header field contains information about the user agent originating the request. This is for statistical purposes, the tracing of protocol violations, and automated recognition of user agents for the sake of tailoring responses to avoid particular user agent limitations (the default User Agent entered is AutoMate).
Specifies the maximum time in seconds that the step should wait for a response from the HTTP server before giving up. It may be useful to increase this value when posting extremely large amounts of data or if waiting for a long transaction to complete (default value is 600 seconds).
Specifies the path and filename of the certificate file used to validate connection. AutoMate supports the following certificate file types:
Internet Security Certificate (.cer) - Security file provided by a third party such as VeriSign or Thwate that confirms the authenticity of a Web site; installed on a Web server (such as Apache or Windows Advanced Server) to authenticate the validity of a certain website hosted on the server.
Privacy Enhanced Mail Certificate (.pem) - Base64-encoded certificate file, such as a PEM-encoded X509 certificate; used to authenticate a secure website; typically imported from a Unix-based Apache Web server and compatible with OpenSSL applications. PEM certificate files are generated automatically and are not meant to be opened or edited manually.
PKCS #12 Certificate File (.pfx) - Encrypted security file that stores secure certificates used to authenticate a person or device, such as a computer or Web server; requires a password to be opened; can be installed by right-clicking the file and selecting "Install PFX."
Personal Information Exchange (.p12) - SSL certificate used to authenticate a secure website on a Microsoft IIS Web server.
Specifies the passphrase used to authenticate connection. A passphrase is a password that may comprise of a whole phrase.
If enabled, specifies that this action will ignore invalid certificates when connecting to a server using SSL.
If enabled, functionality reverts to AutoMate's legacy HTTP engine (used in AutoMate 6 and older versions). This option is available mainly for AutoMate 6 or older users.
Specifies the port that should be used when attempting to connect to the HTTP server. The default value is 80 as most servers use this port.
Specifies the maximum time in seconds that the step should wait for a response from the HTTP server before giving up. It may be useful to increase this value when retrieving extremely large amounts of data or if waiting for a long transaction to complete.
Causes an attempt authenticate with the server first. Specifies the user name to be used during the authentication.
Causes an attempt authenticate with the server first. Specifies the password to be used during the authentication. If created in visual mode, this value is automatically encrypted.
Specifies proxy protocol that should be used. If you are unsure of the value to use in this parameter, contact your network administrator.
The available options are:
System Default (default, recommended): The settings specified in the Task Administrator preferences are used.
None: Explicitly instructs the action not to use a proxy server regardless of the system default
Socks 4: Instructs the action to go through a Socks 4 compliant server
Socks 4a: Instructs the action to go through a Socks 4a compliant server
Socks 5: Instructs the action to go through a Socks 5 compliant server
Note: To create the most portable tasks it is best to specify "system default" and specify proxy settings in the Preferences of the Task Administrator (Proxy Tab). By proceeding this way, tasks created in one environment that may have a proxy server will be portable to others that do not - and vice-versa.
Specifies the port that should be used to connect to the proxy server. Most proxy servers operate on port 1028 (the default) however the proxy server can be customized to operate on other ports
Specifies the hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.
Specifies the username that should be used to authenticate when connecting through the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.
Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.
More on variables
More on expressions
More on the expression builder
NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.
<AMHTTPDOWNLOAD URL="http://www.networkautomation.com/index.htm" FILENAME="c:\index.htm" OVERWRITE="NO" RESULTVARIABLE="myvarname">