Skip to main content

addData()

Last updated 24/10/2023

The addData() is a function that adds a key value pair to the body of the post request, or as URL encoded URL parameters for a get request when using RAW mode for the get and post methods.


info

If the content has been set by the setContent() function, these values will be ignored as the content is fully controlled by the setContent() function. Use either addData(), or setContent() for a request, but not both.


Available

Server


Function Signature
addData(key: string, value: string) : FiveError;

ParameterTypeDescription
keystringThe name of the variable.
valuestringThe value of the variable.

Return Value

Returns null on success, or a FiveError in the event of a failure.

Examples

addData()