2

Can anyone explain the approach used by urllibx opener for heavy lifting in comparison to how request module ?

why the approach of using handler in urllibx goes with like HTTPSHandler , so for auth handler, but in case of requests you can just pass username password like:

r = requests.get('https://api.github.com', auth=('user', 'pass'))

Does both have any advantage over each other, I am also curious because requests also uses urllib3 in background, as far what I have learnt about it.

I was looking for a definitive answer for the clarity , couldn't find a clear difference anywhere w.r.t. use of opener and handler as given in python docs for urllib2 and comparison to requests module.

Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
  • the question w.r.t.handlers and opener using in urllibx in comparison to requests module is not discussed in the duplicate question, so would anyone mind put some light on that ? – Ciasto piekarz Jul 31 '14 at 03:20

0 Answers0