OpenSTA logo OpenSTA SCL Reference
LOAD RESPONSE_INFO BODY Command

LOAD RESPONSE_INFO BODY Command

This command loads a character variable with all or part of the data from an HTTP response message body for a specified TCP connection. It is used after a GET, HEAD or POST command.

OpenSTA will automatically wait until any request on the specified connection ID is complete before executing this command. It is not necessary for the Script to do this explicitly.

If the character data requested is too big to fit into the target variable, it will be truncated. For a response message body containing an HTML document, the optional WITH identifier clause can be used to specify part of the structured document using a special syntax.

The optional RETURNING STATUS load-status clause can be used to specify the integer variable to hold one of two values indicating whether the command succeeded or failed. When RETURNING STATUS is specified, any current ON ERROR action is disabled.

By default, if an error occurs, an error message is written in the audit log and the virtual user will continue. However, if error trapping is enabled, control will be transferred to the error-handling code.

Command Definition:

LOAD RESPONSE_INFO BODY ON conid INTO variable
	{,WITH identifier}
	{,RETURNING STATUS load-status}

conid

An INTEGER variable, integer value or expression identifying the Connection ID of the TCP connection on which the HTTP response message will be received.

variable

The name of a CHARACTER variable into which the HTTP response message body, or the selected part of it, are loaded.

identifier

A CHARACTER variable, quoted character string or expression identifying the data to be retrieved from the response message body. A full a definition of the identifier format is covered in the Identifier section.

load-status

The name of an INTEGER variable into which the status of the LOAD RESPONSE_INFO execution is loaded. Failure returns a negative value.

Example:

LOAD RESPONSE_INFO BODY ON 1 INTO Post-Body

<<<
prev page
^^^
section start
>>>
next page