revXMLRPC_AddParam |
Type | command |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | revXMLRPC_AddParam <XMLRPCdocumentID>, <dataType>, <dataValue>
|
Associations | xml-rpc library |
Summary | Adds a single parameter to an XML-RPC document structure.
|
Introduced | 2.5 |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Parameters | Name | Type | Description |
---|
XMLRPCdocumentID | | The number returned by the revXMLRPC_CreateRequest when you
created the XML-RPC request.
|
dataType | | The type of data contained in the dataValue parameter. "base64": the value is base64-encoded
"boolean": the value is true or false
"dateTime.iso8601": the value is an Internet date
"double": the value is a floating-point number
"int" or "i4": the value is an integer number
"string": the value is a string of characters
"array": the value is an array of data (see below)
"xml": the value is data in xml-format (see below)
|
dataValue | | The content of the data you want to add as a new parameter.
|
|
Example | revXMLRPC_AddParam theRequest, "int", 55
revXMLRPC_AddParam theRequest, "base64", base64Encode(theBinaryData)
put "<struct>" & \
"<member><name>left</name>" & \
"<value><int>10</int></value></member>" & \
"<member><name>top</name>" & \
"<value><int>50</int></value></member>" & \
"<member><name>right</name>" & \
"<value><int>390</int></value></member>" & \
"<member><name>bottom</name>" & \
"<value><int>240</int></value></member>" & \
"</struct>" into theStruct
revXMLRPC_AddParam theDocID, "xml", theStruct
|
Values | Name | Type | Description |
---|
The result | | If the revXMLRPC_AddParam command encounters an error,
the result is set to an error message beginning with "xmlerr" or
"xmlrpcerr".
|
|
Related | Glossary: Standalone Application Settings, standalone application, command, XML-RPC document, LiveCode custom library, XML-RPC
Function: revXMLRPC_GetParamType, revXMLRPC_GetParam, result, revXMLRPC_GetParamCount, revXMLRPC_CreateRequest
Library: XML-RPC library
|
Security | disk, process |
Description | Use the revXMLRPC_AddParam command to add a single parameter of a
given type to an existing XML-RPC document.
To pass an array of data, you have to pass the type as well, in the
following format:
array[:elementType]
For example:
local theArray
repeat with i = 1 to 10
put random(100) into theArray[i]
end repeat
revXMLRPC_AddParam theDocID, "array:int", theArray
If you do not specify an element type, the revXMLRPC_AddParam
command assumes you're passing an array of strings.
If you need to add complex parameters (such as arrays of various types,
or structs) you can specify a dataType of xml, and pass raw xml.
|
Tags | networking |