curl-and-python

Re: pycurl and custom POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 30 Jan 2009 15:16:09 +0100 (CET)

On Fri, 30 Jan 2009, Sagi S wrote:

> curl -i -X POST -H "Content-Type: text/json" -d
> '[{"command":"connect","refid":1},{"command":"post", "refid":2,
> "channel":"chat", "data":"hello world 3"}]' http://media.mysite.com/qrpc

-d implies POST so no reason to use -X there.

> But it doesn't work as need. Need help with forming POST request..
> All other options produce errors, POSTFIELD requires "=" etc.

No, POSTFIELDS does not require '=' as in fact -d above uses that option (as
curl --libcurl would show!)

--
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2009-01-30