cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

How to fully customize the HTTP request

From: Mohamed Lrhazi <lrhazi_at_gmail.com>
Date: Sun, 21 May 2006 01:15:16 -0400

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?

Mohamed
Received on 2006-05-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET