cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: XML RPC

From: Daniel Stenberg <daniel_at_haxx.se>
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 "&lt;?xml
> version=""1.0""?&gt;&lt;methodCall&gt;&lt;methodName&gt;currentTime.getCurrentTime&lt;/methodName&gt;&lt;params&gt;&lt;/params&gt;&lt;/methodCall&gt;"
> 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.html
Received on 2008-06-30