Method GetRequestBodyItem
Gets Request Body Item valueUsage
Function GetRequestBodyItem(
String Name,
Integer Position [Optional],
Boolean Report [Optional]
)
Parameters
Name
Type: String
The name of the Body Item
Position (optional)
Type: Integer
Default Value: 0
Position if request contains few item names
Report (optional)
Type: Boolean
Default Value: False
Generate report for this step
Returns
Request Body Item value or Empty string
Example
VBScript
msgbox Server("API Server").Method("CreateBook").GetRequestBodyItem("Title")
' set position and add to report result
msgbox Server("API Server").Method("CreateBook").GetRequestBodyItem("Title", 0, True)
JavaScript
alert(Server("API Server").Method("CreateBook").GetRequestBodyItem("Title"));
// set position and add to report result
alert(Server("API Server").Method("CreateBook").GetRequestBodyItem("Title", 0, true));