Share this page

# web.getIntProperty

Returns specific information about the previous HTTP request.

Miscellaneous Functions

## 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 Argument | Value | Description
--- | --- | ---
web.HTTP_INFO_RETURN_CODE | 1 | The return code in HTTP response header.
web.HTTP_INFO_DOWNLOAD_SIZE | 2 | Returns the size in bytes of the last download, including the header, body, and communications overhead (for example, NTLM negotiation).
web.HTTP_INFO_DOWNLOAD_TIME | 3 | Returns the time in milliseconds of the last download.
web.HTTP_INFO_TOTAL_REQUEST_STAT | 4 | Returns 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_STAT | 5 | Returns 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_ERROR | 6 | Returns 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;
    }

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: