HTTP - Clear

Declaration

<AMHTTP ACTIVITY="clear" SESSION="test" REMOVEPERSIST="YES/NO" />

Related Topics   

Description

Clears a predefined connection from a task.

Practical usage

Used to clear a predefined connection from a task.

Parameters

General

Property Type Required Default Markup Description
Predefined connection Text (options) Yes (Empty) SESSION="HttpSession1" Specifies the predefined connection to clear. Predefined connections are created using the HTTP - Define activity.
Remove Persisted Token (OAuth 2.0 only) Yes/No No No REMOVEPERSIST="YES" If selected, deletes the persisted token information from disk for predefined OAuth 2.0-based connections using the Persist Token parameter.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

Using a predefined connection with the GET request, this sample task gets content from the server and then displays result data, request header information, and response header information in a dialog. Then, the task clears the connection information.

Copy
<AMVARIABLE NAME="myVar" VALUE="" />
<AMHTTP ACTIVITY="define" SESSION="HttpSession1" AUTHENTICATION="basic" USERNAME="myUsername" PASSWORD="AM5oDoxAdt+QDxeXhPeW9NBCmdsy6+Csc4EVMzS49H547I=aME" IGNOREINVALIDCERTIFICATE="YES" />
<AMHTTP SESSION="HttpSession1" URL="http://www.fortra.com" RESULTDATASET="myDataset" RESULTVARIABLE="myVar" />
<AMSHOWDIALOG>Request Header Info - %myDataset.RequestHeader%Response Header Info - %myDataset.ResponseHeader%</AMSHOWDIALOG>
<AMHTTP ACTIVITY="clear" SESSION="HttpSession1" />