HTTP Post/Put Action

Description

Posts form data using the HTTP protocol to the specified URL. Useful when data must be posted via HTTP protocol without using an external browser.

Declaration

<AMHTTPPOST URL="text" TYPE="text [options]" STRING="text" FILE="text" PORT="number" TIMEOUT="number" USERNAME="text" PASSWORD="text" PROXYTYPE="text [options]" PROXYSERVER="text" PROXYPORT="text" PROXYUSERNAME="text" PROXYPASSWORD="text">

Example

<AMHTTPPOST URL="http://www.networkautomation.com/Automated Workflow/" STRING="name=steve&amp;company=dustin">

<AMHTTPPOST URL="http://www.networkautomation.com/Automated Workflow/" WHATTOPOST="file" FILE="c:\postdata.txt">

General Tab Parameters

URL: Specifies a URL (uniform resource locator) to which the data should be posted. Click the Expression Builder icon to build and insert an expression.

Click Auto fill to specify an URL or file location where the data exists.

Text, Required
MARKUP: URL="http://www.networkautomation.com/index.htm"

Use specific string: Specifies a string of data to post. Valid strings are determined by the server. Click the Editor icon to specify values for the form fields:

Text, yes/no default=yes
MARKUP: STRING="name=steve&city=Los%20Angeles&phone=555-5555"

Use local file: Specifies the path and filename of a file containing the data that should be posted to the URL specified.

Text, Optional
MARKUP: FILE="c:\filename\file.txt"

Connection Tab Parameters

Username: Causes an attempt authenticate with the server first. Specifies the user name to be used during the authentication.

Text, Optional
MARKUP: USERNAME="johndoe"

Password: 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.

Text, Optional
MARKUP: PASSWORD="mypassword"

Timeout: Specifies the maximum time in milliseconds, seconds, minutes, or hours 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.

Number, Optional default=10
MARKUP: TIMEOUT="50"

Advanced Tab Parameters

Populate variable with result: Specify the variable to populate with the data.

Content Type: Specify the type of content to put/post. Click the Expression Builder icon to build and insert an expression.

Use compatibility mode:

Proxy Tab Parameters

Proxy type: Specifies proxy protocol that should be used.  If you are unsure of the value to use in this parameter, contact your network administrator.

  • System default (default, recommended): The settings specified 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 Workflows it is best to specify "system default" settings.  By proceeding this way, Workflows created in one environment that may have a proxy server will be portable to others that do not - and vice-versa.

Text [options], Optional - Default (none)
MARKUP: PROXYTYPE="Socks5"

Proxy host: Specifies the hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

Text, Optional - Default (blank)
MARKUP: PROXYSERVER="proxy.host.com"

Proxy port: 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.

Number, Optional - Default 1028
MARKUP: PROXYPORT="3000"

User ID (Proxy): 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.

Text, Optional - Default (none)
MARKUP: PROXYUSERNAME="username"

Password (Proxy): Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Designer it is written to the Workflow encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Text, Optional - Default (none)
MARKUP: PROXYPASSWORD="encrypted"