HTTP action

The HTTP action gives you the ability to build up a list of raw HTTP requests to be made by the agent. The agent makes these requests, but does not parse the contents returned.

You can use this action to script Web Services requests or to manually script requests made by a plug-in.

The Recorder, by default, generates HTTP actions if you record an application where a plug-in makes HTTP requests.

In some cases, enabling Flash or Silverlight for script playback results in the agent requesting those options. In these cases, you should remove the HTTP action in order to avoid duplicate requests.

An object request consists of the following values:

Method

The agent supports raw HTTP GET, POST, DELETE, PUT, and HEAD requests.

URL

This can be a static value; or it can be made dynamic through custom JavaScript and the backtick syntax.

Headers

Additional HTTP request headers can be manually set to apply to all the object requests within an HTTP action; or they can be defined for individual object requests.

POST data

You can add and modify POST content for object requests that have POST, DELETE, or PUT selected as their method. The Recorder enables you to add the content as either plain text or as a base64-encoded string. The base64 option is helpful if the request sends binary content.

Reply handler

The reply handler enables a user to execute a block of JavaScript code upon intercepting the HTTP reply for a given object request. Dynatrace provides an API that grants access to the reply and enables the user to pull data from the reply headers and/or content. Reply handling takes place within the control target window; any variables defined with the reply handler code will not be accessible in other target windows.

When processing the HTTP request, the agent goes down the list in sequence; however, all requests are essentially fired simultaneously. The agent does not wait for an object to complete downloading before requesting the next one listed. The HTTP action should be followed by a Wait action.

The HTTP action was designed to provide Manual Object Download functionality to the browser agents, specifically for use cases that require it in Mobile. The feature is also intended for use in scripting requests from plug-ins and for scripting Web Service requests.

Using the HTTP feature to work around script issues is not recommended. This method is not dynamic and the agents will not parse the return content. Using this method will generate a very brittle and unreliable script.