Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom headers with pycurl

Tags:

Can I send a custom header like "yaddayadda" to the server with the pycurl request?

like image 515
Pockata Avatar asked Jun 15 '10 11:06

Pockata


1 Answers

I would code something like:

pycurl_connect = pycurl.Curl() pycurl_connect.setopt(pycurl.URL, your_url) pycurl_connect.setopt(pycurl.HTTPHEADER, ['header_name1: header_value1',                                           'header_name2: header_value2']) pycurl_connect.perform() 
like image 134
systempuntoout Avatar answered Sep 25 '22 19:09

systempuntoout