Hi i'm wondering if i can send a custom header like "yadayadayad" to the server with the pycurl requsest ? Thanks :)
+2
A:
I would code something like:
pycurl_connect = pycurl.Curl()
pycurl_connect.setopt(pycurl.URL, your_url)
pycurl_connect.setopt(pycurl.HTTPHEADER, ['header_name: header_value'])
pycurl_connect.perform()
systempuntoout
2010-06-15 12:11:52
thanks mate ! :)
Pockata
2010-06-15 20:38:13
@Pockata you are welcome
systempuntoout
2010-06-15 20:45:07
A:
you can, with HTTPHEADER. just provide your custom headers as a list, like so:
header = ['test: yadayadayada', 'blahblahblah']
curl.setopt(pycurl.HTTPHEADER, header)
maranas
2010-06-15 12:15:58