Exampple.Xml.Rpc (exampple v0.10.6)

XML-RPC let us to create method calls and responses. It works in both directions, encoding/decoding requests and encoding/decoding responses.

Link to this section Summary

Link to this section Functions

Link to this function

decode_params(params)

Link to this function

decode_request(request)

Link to this function

decode_value(value)

Link to this function

encode_params(data)

Link to this function

encode_response(data)

Encode a response. Providing a data, it's generating the XML-RPC valid response.

Example:

iex> Exampple.Xml.Rpc.encode_response(100)
iex> |> to_string()
"<methodResponse><params><param><value><int>100</int></value></param></params></methodResponse>"

iex> Exampple.Xml.Rpc.encode_response(10.5)
iex> |> to_string()
"<methodResponse><params><param><value><double>10.5</double></value></param></params></methodResponse>"

iex> Exampple.Xml.Rpc.encode_response([true, false, 10])
iex> |> to_string()
"<methodResponse><params><param><value><array><data><value><boolean>1</boolean></value><value><boolean>0</boolean></value><value><int>10</int></value></data></array></value></param></params></methodResponse>"
Link to this function

encode_value(datetime)