curl-and-python

Re: help to Converting Curl to PyCurl code

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 19 Dec 2010 18:58:02 +0100 (CET)

On Sun, 19 Dec 2010, Mohan L wrote:

> curl -d "command=listCapacity&zoneId=1&podId=1" -X POST -b
> "JSESSIONID=webD~C" https://manage.com:443/client/api -k > out.xml

The -X POST above makes no difference, -d implies POST.

> running the above command in command line gives the xml file as output. I
> want to convert this using Pycurl code so that it will be easy to parse the
> xml from Python.

A first shot could be to use "--libcurl example.c" to see how a C version of
the code would look like, and then convert that one into pycurl...

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2010-12-19