web.getIntProperty

Returns specific information about the previous HTTP request.

Syntax

web.getIntProperty( httpInfoType );
Argument
Description
httpInfoType
One of the options listed below.

Parameterization

Parameterization is not applicable to this function.

Return Values

The web.getIntProperty function returns specific information about the previous HTTP request.

The meaning of the return value depends on the httpInfoType argument. httpInfoType can be any of the following options:

httpInfoType ArgumentValueDescription
web.HTTP_INFO_RETURN_CODE1The return code in HTTP response header.
web.HTTP_INFO_DOWNLOAD_SIZE2Returns the size in bytes of the last download, including the header, body, and communications overhead (for example, NTLM negotiation).
web.HTTP_INFO_DOWNLOAD_TIME3Returns the time in milliseconds of the last download.
web.HTTP_INFO_TOTAL_REQUEST_STAT4Returns the accumulated size of all headers and bodies since the first time web.getIntProperty was issued with HTTP_INFO_TOTAL_REQUEST_STAT.
web.HTTP_INFO_TOTAL_RESPONSE_STAT5Returns the accumulated size, including header and body, of all responses since the first time web.getIntProperty was issued with HTTP_INFO_TOTAL_RESPONSE_STAT
web.HTTP_INFO_LAST_SOCKET_ERROR6Returns the last socket error. On timeout, web.getIntProperty(HTTP_INFO_LAST_SOCKET_ERROR) returns 10060. For other errors, see the socket documentation.

Example

function Action(){
   {

   var httpRetCode;

   web.customRequest(
    {
      name : 'kalimanjaro', 
      url : 'http://kalimanjaro/', 
      method : 'GET', 
      resource : 0, 
      recContentType : 'text/html', 
      referer : '', 
      snapshot : 't17.inf', 
      mode : 'HTTP'
    }
  );

   httpRetCode = web.getIntProperty(web.HTTP_INFO_RETURN_CODE);

   if (httpRetCode == 200)

       lr.logMessage("The script successfully accessed the My_home home page");

       else

       lr.logMessage("The script failed to access the My_home home page ");

return 0;
}