File: requests_intercept.py

package info (click to toggle)
python-wsgi-intercept 1.13.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 560 kB
  • sloc: python: 1,390; makefile: 56; sh: 5
file content (15 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Intercept HTTP connections that use
`requests <http://docs.python-requests.org/en/latest/>`_.
"""

from requests.packages.urllib3.connectionpool import (HTTPConnectionPool,
        HTTPSConnectionPool)
from requests.packages.urllib3.connection import (HTTPConnection,
        HTTPSConnection)
from ._urllib3 import make_urllib3_override


install, uninstall = make_urllib3_override(HTTPConnectionPool,
                                           HTTPSConnectionPool,
                                           HTTPConnection,
                                           HTTPSConnection)