Skip to main content

addData()

Last updated 2/04/2024

The addData() is a function used on the HTTPClient object that adds a key value pair to the request, either as URL encoded URL parameters in the URL query string when being sent as a GET request, or as URL encoded URL parameters in the body as a POST request

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(name: string, value: string) : FiveError;

ParameterTypeDescription
namestringThe name of the variable
valuestringThe value of the variable

Return Value

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

Example

addData()