OpenSTA logo OpenSTA SCL Reference
LOAD RESPONSE_INFO HEADER Command

LOAD RESPONSE_INFO HEADER Command

This command loads a character variable with all or some of the HTTP response message header fields for a specified TCP connection.

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 data string is too long to fit into the target variable, it will be truncated.

The WITH clause can be used to specify the names of a header field whose value is to be retrieved from the HTTP response message. If this clause is omitted, all the response message header fields are retrieved.

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. There is an SCL include file "response_codes.inc" supplied with OpenSTA, which defines SCL integer constants for response status values. When RETURNING STATUS is specified, the ON ERROR action is disabled.

Command Definition:

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

conid

An integer variable, integer value or integer 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 headers, or the selected headers, are loaded.

identifier

A character variable, quoted character string or character expression containing the name of the response message header field to be retrieved. If the header in question is "Set-Cookie" then the identifier syntax is further extended so that "Set-Cookie,name" can be specified. This will retrieve just the "name=value" part of the Set-Cookie header that matches the name. The name may also contain the wildcard character * and the first matching cookie name will be retrieved.

load-status

An INTEGER variable into which the status of the LOAD RESPONSE_INFO execution is loaded.

Example:

LOAD RESPONSE_INFO HEADER ON 4 INTO Resp-Heads

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