Method GetHeaderValueByIndex
Returns response header value by indexUsage
Function GetHeaderValueByIndex(
String HeaderName,
Integer Index,
Boolean Report [Optional]
)
Parameters
HeaderName
Type: String
Header Name
Index
Type: Integer
Index
Report (optional)
Type: Boolean
Default Value: False
Generate report for this step
Returns
Header Value
Example
VBScript
Server("API Server").Method("Method").Execute
' Execute method should be called before get header value
headerValue = Server("API Server").Method("Method").GetHeaderValueByIndex("Server", 2, True)
JavaScript
Server("API Server").Method("Method").Execute();
// Execute method should be called before get header value
var headerValue = Server("API Server").Method("Method").GetHeaderValueByIndex("Server", 2, true);
Comment
Execute method should be called before get header value by index