GetSubrequestHeader Function

Description:

This functions is only valid in Navigate and Submit commands.
If a web page specified in the Navigate or Submit command contains some subrequests, the HTTP requests which load the subrequests will be automatically executed by the AgileLoad injector. The GetSubrequestHeader function allows to load the HTTP header of those subrequests in a character string variable.

The subrequest can be specified by:

Format:

NAVIGATE PRIMARY url IDENTIFIER id
    subrequestHeaderVar = GetSubrequestHeader(index);
    subrequestHeaderVar = GetSubrequestHeader(index, frameIndex);
    subrequestHeaderVar = GetSubrequestHeader(subrequestUrl, urlIndex, [nocase|regexp]);
    subrequestHeaderVar = GetSubrequestHeader(subrequestUrl, urlIndex, frameIndex, [nocase|regexp]);
 

Parameters:

index

integer expression which specifies the index of the subrequest to extract.

frameIndex

integer expression which specifies the index of the frame which contains the subrequest to extract.

subrequestUrl

character string expression which specifies the url (regular expression if the regexp option is specified) of the subrequest to extract.

urlIndex

integer expression which specifies the index of the subrequest to extract (with url=subRequestUrl).

 

Example:

STRING szSubRequestHeader;

NAVIGATE PRIMARY "http://demo.fmstocks.com/fmstocks/default.asp" IDENTIFIER 1
    szSubRequestHeader=GetSubRequestHeader("http://demo.fmstocks.com/fmstocks/home.asp", 1, NOCASE)

See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap