curl-users
Re: XML RPC
Date: Mon, 30 Jun 2008 22:17:32 +0200 (CEST)
On Mon, 30 Jun 2008, Guilhem MARTIN wrote:
> I'm trying to make an XML RPC call for retrieving current time
> (http://www.xmlrpc.com/currentTime).
>
> I've tried following:
>
> curl.exe --data-ascii "<?xml
> version=""1.0""?><methodCall><methodName>currentTime.getCurrentTime</methodName><params></params></methodCall>"
> time.xmlrpc.com/RPC2
> (and prior to that, I also tried with < and > instead of lt and gt)
>
> Yet this syntax is not understood by the command prompt, in particular
> because "&" is interpreted as a command.
A normal POST is supposed to be URL-encoded, not HTML-encoded like you've done
it. That is < is %3C and > is %3E.
--date-urlencode does it for you in a recent curl release.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2008-06-30