why I needed this (was Re: anyone here got a function to find is a string is base64 encoded?)
Andre Garzia
soapdog at mac.com
Sun Jul 25 20:56:04 EDT 2004
On Jul 25, 2004, at 9:36 PM, Dar Scott wrote:
> Is this safe?
>
> Dar
>
Dar,
thats on the client side, like you are the one making the request. You
call the xmlrpcRequest function with an arbitrary numbers of
parameters. They will all be probed and an XML-RPC Method Request XML
will be assembled. Integers will be put inside <int> tags, arrays
inside <array> or <struct> depending on the presence of keys or not.
One problem was how to detect a base64 param if they look like strings?
Now we can try to detect them and put well formed base64 inside
<base64> param, were not encoding nor decoding it, we're just taking it
to the server.
now you can do xmlrpcRequest "http://www.myServer.com",
"rpcDemos.doStuff", 1, "a string", base64Encode("some stuff")
and we'll generate a correct XML like this:
<methodCall>
<methodName>rpcDemos.doStuf</methodName>
<params>
<param><value><int>1</int></value></param>
<param><value><string>a string</string></value></param>
<param><value><base64>sdkfg8q47g4f8g4f3g81</base64></value></param>
</params>
</methodCall>
cheers
andre
--
Andre Alves Garzia ð 2004 ð BRAZIL
http://studio.soapdog.org
More information about the use-livecode
mailing list