0

I want to replace requests with pycurl in my existing code base. Is it possible to write interface similar to that of requests?

In particular I am looking for a drop in replacement for requests .iter_content() method.

Amit
  • 712
  • 2
  • 13
  • 26
  • 1
    Why on earth would you want to replace `requests` with `pycurl`, especially if you want the same interface? – mhawke Apr 09 '16 at 08:19
  • @mhawke we are facing issues with NTLM authentication when using requests module; it works fine with pycurl. – Amit Apr 09 '16 at 08:38
  • 1
    Are you aware of [requests-ntlm](https://github.com/requests/requests-ntlm). Also see the same package at https://pypi.python.org/pypi/requests_ntlm. – mhawke Apr 09 '16 at 10:26
  • @mhawke yes. I am using this as of now in my project. – Amit Apr 09 '16 at 10:37
  • Are the problems with `requests` insurmountable? What are they? – mhawke Apr 09 '16 at 10:45
  • @mhawke 1) we are getting 401 in response from certain exchange servers. at the same time other modules that use pycurl are working fine with same exchange servers. 2) i would want to take advantage of pycurl's performance http://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance. this is something that was not evaluated before. – Amit Apr 09 '16 at 10:52

0 Answers0