curl-and-python

pycurl and rest PUT interface

From: Mark Seger <mjseger_at_gmail.com>
Date: Tue, 22 Jan 2013 16:20:45 -0500

I've been looking around the web for an answer and can't find one there nor
was there anything obvious to me in the docs.

I have an example what I want to do in curl, but don't know how to
translate this to pycurl.

curl -X PUT -k -i -H X-Auth-Token:$auth -T xyzzy ${url}/xyzzy/xyzzy

The variable $auth contains an authentication token and xyzzy is a file I
want to up load to the destination pointed to by $url and the subdirectory
xyzzy/xyzzy. Ultimately I really want to do this from an in-memory data
structured loaded into a variable but was thinking trying to upload a file
first might be a good starting point.

I do see a POST option tut that won't help.

Can someone help? I have gotten pycurl working to the point I can get the
token, but now I can't figure out what to do with it.

-mark

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-01-22