Method GetRequestHeader
Gets Request Header value which was set manually by userUsage
Function GetRequestHeader(
String Name,
Boolean Report [Optional]
)
Parameters
Name
Type: String
The name of the Header
Report (optional)
Type: Boolean
Default Value: False
Generate report for this step
Returns
Header value or Empty string if Header is absent
Example
VBScript
Server("API Server").Method("GetBookById").SetRequestHeader "Test", "Unknown header"
' Display header value in message box
msgbox Server("API Server").Method("GetBookById").GetRequestHeader("Test", True)
JavaScript
Server("API Server").Method("GetBookById").SetRequestHeader("Test", "Unknown header");
// Display header value in message box
alert(Server("API Server").Method("GetBookById").GetRequestHeader("Test", true));
Comment
Display header value in message box