PUT with proxy-support

Shashwat Anand anand.shashwat at gmail.com
Thu Aug 25 13:49:56 CEST 2011


On Thu, Aug 25, 2011 at 4:48 PM, Max Countryman <maxc at me.com> wrote:

> Check out the python Requests module:
> http://docs.python-requests.org/en/latest/index.html
>
>
Python request module is not documented very well IMHO.
I tried to figure how to make PUT calls, how to add proxy, how to add
certificates in headers.
Did not managed to find all of it.
Am not sure is supports REST calls with proxy support.



> Sent from my iPhone
>
> On Aug 25, 2011, at 7:07, Shashwat Anand <anand.shashwat at gmail.com> wrote:
>
> I want to make a PUT request.
> I need some headers of my own ( certificates etc ) and I need to
> mandatorily use a proxy.
> Also the url is of the form <http://www.xyz.com/abc>http://www.xyz.com/abcand I don't have permission to put data
> on  <http://www.xyz.com>http://www.xyz.com while I do have permission to
> put data on  <http://www.xyz.com/abc>http://www.xyz.com/abc
>
> I tried httplib, httplib2, urllib2 with no avail.
> I managed to do this via command line curl:
>
> $ curl http:/ <http://xyz.com/testing/shashwat/test.txt>
> xyz.com/testing/shashwat/test.txt -T test.txt -H "sw-version: 1.0" -H
> "CA-Cert-Auth:v=1;a=yxyz.prod;h=10.10.0.1;t=1316594650;s=.AeEYJMMfElN74fnWD3GlXJ4J.1KiQFg--"
> --proxy proxy.xyz.com:3128 -H "Content-Type:text/plain"
>
> Is there a way to do it in python apart from using command line curl in
> python.
> The machine is RHEL4 and is giving hard time installing pycurl.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110825/f4d46e5e/attachment.html>


More information about the Python-list mailing list