HTTP - Trace
Declaration
<AMHTTP ACTIVITY="trace" URL="text" COOKIEFILE="text" OVERWRITECOOKIEFILE="YES/NO" RESULTVARIABLE="text" RESULTDATASET="text" AUTHENTICATION="text (options)" USERNAME="text" PASSWORD="text (encrypted)" TIMEOUT="number" USERAGENT="text" CERTIFICATE="text" CERTIFICATEPASSPHRASE="text (encrypted)" IGNOREINVALIDCERTIFICATE="YES/NO" HEADER NAME="text" VALUE="text" /><COOKIE NAME="text" VALUE="text" /></AMHTTP>
Description: Echoes back the received request, so that a client can see what (if any) changes or additions have been made by intermediate servers.
Practical Usage
Can be used as a debug tool by resounding input back to the user.
General Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
URL |
Text |
Yes |
(Empty) |
URL="www.google.com" |
The URL (Uniform Resource Locator) to the resource that should be deleted. |
Populate variable with result data |
Text |
No |
(Empty) |
RESULTVARIABLE="myVar" |
The name of an existing variable to populate with the header information. |
Dataset to populate |
Text |
No |
(Empty) |
RESULTDATASET="theDataset" |
The name of the dataset to populate with request and response data as well as other relevant information about the action performed. More details regarding the fields that this dataset creates can be found below under Datasets. |
Credentials Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Authentication type |
Text (options) |
No |
None |
|
The type of authentication that this activity should use. The available options are:
|
Username |
Text |
No |
(Empty) |
USERNAME="Coolguy" |
A valid user name to be used during the authentication. If the Authentication Type parameter is set to None, this parameter is ignored. |
Password |
Text |
No |
(Empty) |
PASSWORD="encrypted" |
The password to be used during the authentication. If created in visual mode, this value is automatically encrypted. If the Authentication Type parameter is set to None, this parameter is ignored. |
Certificate file |
Text |
No |
(Empty) |
CERTIFICATE="C:\temp\cert.pfx" |
The path and file name of the certificate file used to validate connection. Click the folder icon to navigate to the specified certificate file or enter the path and file name manually. Enter this information if a Certificate Authority (CA) is used to identify one end or both end of the transactions. Supports the following certificate file types:
|
Passphrase |
Text |
No |
(Empty) |
CERTIFICATEPASSPHRASE="encrypted" |
The passphrase used to authenticate connection. A passphrase is a password that may comprise of a whole phrase. |
Ignore invalid server certificate |
Yes/No |
No |
No |
IGNOREINVALIDCERTIFICATE="yes" |
If set to YES, specifies that this activity will ignore invalid certificates when connecting to a server using SSL. This option is set to NO by default. |
Advanced Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Protocol Version |
Text (options) |
No |
HTTP 1.1 |
|
The protocol version to use. The available options are:
|
User Agent |
Text (options) |
Yes |
AutoMate |
USERAGENT="text" |
The user agent originating the request. A website may require a User Agent string to be sent to it for statistical purposes, 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). |
Timeout |
Number |
No |
100 |
TIMEOUT="50" |
The maximum time that the step should wait for a response from the HTTP server before failing with a time out error. 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 100 seconds). |
Measure |
Text (options) |
No |
seconds |
|
The time measurement that should correspond to the value entered in the Timeout parameter. The available options are:
|
Cookies to/from file |
Text (options) |
No |
Block |
|
Specifies how this activity should handle cookies sent to/from the server. The available options are:
NOTE: HTTP cookies are used for authenticating, session tracking (state maintenance), and maintaining specific information about users. |
Cookie file |
Text |
No |
(Empty) |
COOKIEFILE= "c:\theFile" |
The cookie file that this activity should use to identify and/or authenticate a server-based session. Cookies can be stored in different locations, depending on the version of explorer and Windows you are using. This parameter is not available if the Cookies to/from file parameter is set to Block. |
Overwrite cookie file |
Yes/No |
No |
No |
OVERWRITECOOKIEFILE= "yes" |
HTTP requests and responses are written to the same cookie file. By default, new request/response data is appended at the end of the cookie file as a new line. If this parameter is set to YES, new request/response data will overwrite existing data. Overwriting is a good way to minimize the size of a cookie file. This parameter is set to NO by default. |
Request Headers |
Text |
No |
(Empty) |
|
Allows you to add custom HTTP headers to the request. Required parameters are:
NOTE: Request headers can be used in conjunction with cookie files. |
Request Cookies |
Text |
No |
(Empty) |
|
Allows you to add custom HTTP cookies to the request. Required parameters are:
NOTE: Request cookies can be used in conjunction with cookie files. |
Proxy Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Proxy type |
Text (options) |
No |
System Default |
|
The 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:
NOTE: To create the most portable tasks, it is best to specify System Default and specify proxy settings globally in the system settings. By proceeding in this manner, tasks created in one environment that may have a proxy server will be portable to others that do not, and vice-versa. |
Proxy server |
Text |
No |
(Empty) |
|
The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. |
Proxy port |
Number |
No |
1028 |
PROXYPORT="3000" |
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. |
Use authentication |
|
|
|
|
If enabled, a proxy username and password is required for authentication. Only valid when Socks 5 or HTTP is specified in the Proxy type parameter as they are the only versions that support authentication. This is a visual mode parameter only available during design time, thus, contains no markup. |
Proxy username |
Text |
No |
(Empty) |
PROXYUSERNAME="HulkHogan" |
The username that should be used to authenticate when connecting through the proxy server. This parameter is active only if the Use authentication parameter is enabled. |
Proxy password |
Text |
No |
(Empty) |
PROXYPASSWORD="encrypted" |
The password that should be used to authenticate when connecting through the proxy server. When the step is created in visual mode using the Task Builder it is written to the task encrypted. This parameter is active only if the Use authentication parameter is enabled. |
Description tab - A custom description can be provided on the Description tab to convey additional information or share special notes about a task step.
Error Causes tab - Specify how this step should behave upon the occurrence of an error. (Refer to Task Builder > Error Causes Tab for details.)
On Error tab - Specify what AWE should do if this step encounters an error as defined on the Error Causes tab. (Refer to Task Builder > On Error Tab for details.)
Datasets
A dataset is a multiple column, multiple row container object. This activity creates and populates a dataset containing a specific set of fields in addition to the standard dataset fields. The table below describes these fields (assuming the dataset name assigned was theDataset).
Name |
Type |
Return Value |
---|---|---|
theDataset.RequestHeader |
Text |
Returns the request header. The header fields define various characteristics of the data transfer that is requested or the data that is provided in the message body. HTTP request header fields contain the parameters of an HTTP request operation. |
theDataset.RequestCookies |
Text |
Gets a collection of cookies sent by the client. |
theDataset.Data |
Text |
The progress of the snapshot, in percentage. |
theDataset.ResponseHeader |
Text |
Returns the response header. HTTP response header fields contain the parameters of an HTTP response operation. |
theDataset.ResponseCookies |
Text |
Gets the response cookie collection. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: This sample task traces url "www.google.com" and creates and populates a dataset named "myDataset". It then displays the message "%myDataset.RequestHeader%" in a message box titled "Request Header Information" and displays the message "%myDataset.ResponseHeader%" in a message box titled "Response Header Information".
<AMVARIABLE NAME="myVar"></AMVARIABLE> <AMHTTP ACTIVITY="trace" URL="www.google.com" BLOCKCOOKIES="YES" RESULTVARIABLE="myVar" RESULTDATASET="myDataset" /> <AMMESSAGEBOX WINDOWTITLE="Request Header Information">%myDataset.RequestHeader%</AMMESSAGEBOX> AMMESSAGEBOX WINDOWTITLE="Response Header Information">%myDataset.ResponseHeader%</AMMESSAGEBOX>