Skip to main content

addData()

Last updated 1/10/2024

The

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

info
If the content has been set by
setContent()
, 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
name
stringThe name of the variable
value
stringThe value of the variable

Return Value

Returns

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

Example

addData()