curl-library
Re: How to fully customize the HTTP request
From: Alexander Lazic <al-curllibrary_at_none.at>
Date: Sun, 21 May 2006 11:19:02 +0200
Date: Sun, 21 May 2006 11:19:02 +0200
On Son 21.05.2006 01:15, Mohamed Lrhazi wrote:
>I need to send a custom HTTP request, PURGE request, to a Squid proxy
>server. I tried this, using Python:
>
>c = pycurl.Curl()
>c.setopt(c.URL, 'http://10.0.0.1/http://yahoo.com/index.html')
>c.setopt(c.CUSTOMREQUEST,'PURGE')
>
>10.0.0.1 being my Squid server. This causes cURL to send
>
>PURGE /http://yahoo.com/index.html HTTP/1.1
>
>The leading slash in the above request is my problem. How do why get
>rid of it?
How about to set the proxy?
c.setopt(c.CURLOPT_PROXY,'http://10.0.0.1/')
As i know squid catch the reqeust.
hth
alex
Received on 2006-05-21