Method SetRequestBodyItem
Sets Request Body Item valueUsage
Function SetRequestBodyItem(
String Name,
String Value,
Boolean Overwrite [Optional]
)
Parameters
Name
Type: String
The name of the Body Item
Value
Type: String
The new value to set (must be a string)
Overwrite (optional)
Type: Boolean
Default Value: True
True if keep only single Body Item name in a list, False to add a new item in a collection
Returns
No return value
Example
VBScript
Server("API Server").Method("CreateBook").SetRequestBodyItem "Author", "Unknown", True
JavaScript
Server("API Server").Method("CreateBook").SetRequestBodyItem("Author", "Unknown", true);
Documentation Categories
![](https://www.zaptest.com/wp-content/uploads/2022/02/1SCRIPT_STEP.jpg)
ZAPTEST
![](https://www.zaptest.com/wp-content/uploads/2022/02/FARM.jpg)
FARM
![](https://www.zaptest.com/wp-content/uploads/2022/02/LOAD.jpg)