curl options error
Closed this issue · 2 comments
lordcreations commented
TypeError: request() got an unexpected keyword argument 'curl'
dcoles commented
Thank you for your bug report.
The cURL options example in the latest release (0.1.0) no longer works as of d1c8e02 ("Add basic Session support").
I'll have to think about whether this should be exposed via the main interface, or if it should be restricted to the request Session object.
In the mean time, here's how to set cURL options on a request:
import pycurl
import pycurl_requests as requests
with requests.Session() as session:
session.curl.setopt(pycurl.NOBODY, 1)
response = session.get('http://example.com')
dcoles commented
Updated the README with the new method of setting cURL options.