Skip to content

Instantly share code, notes, and snippets.

@trampolinerocket
trampolinerocket / 0_urllib2.py
Created June 3, 2017 01:06 — forked from kennethreitz/0_urllib2.py
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()