File: urllib3_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 (13 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Intercept HTTP connections that use
`urllib3 <https://urllib3.readthedocs.org/>`_.
"""

from urllib3.connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from urllib3.connection import HTTPConnection, HTTPSConnection
from ._urllib3 import make_urllib3_override


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