to_xmlrpc: Create a 'XML-RPC' Call

View source: R/xmlrpc2.R

to_xmlrpcR Documentation

Create a XML-RPC Call

Description

Constructs the XML body for an XML-RPC request. This function takes the target method name and a list of R objects as parameters. Each parameter in the list is converted into its corresponding XML-RPC representation using the 'rpc_serialize' method. The resulting XML structure follows the XML-RPC specification for a method call, encapsulating the method name and the serialized parameters. This function is typically used internally by the main 'xmlrpc' function to prepare the request before sending it to the server, but it can also be used directly to inspect the XML that would be generated.

Usage

to_xmlrpc(method, params)

Arguments

method

a character string giving the name of the method to be invoked.

params

a list containing the parmeters which are added to the XML file sent via the remote procedure call.

Value

an object of class "xml_node" containing a XML-RPC call.

Examples

params <- list(1L, 1:3, rnorm(3), LETTERS[1:3], charToRaw("A"))
cat(as.character(to_xmlrpc("some_method", params)))


xmlrpc2 documentation built on June 8, 2025, 10:46 a.m.