Spaces:
Running
Running
File size: 452 Bytes
261c237 e99df76 261c237 abe1c43 0a54372 abe1c43 0a54372 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | from __future__ import annotations
"""Direct HTTP transport for FCC-local traffic."""
from http.client import HTTPResponse
from urllib.request import ProxyHandler, Request, build_opener
_DIRECT_OPENER = build_opener(ProxyHandler({}))
def open_local_request(request: Request, *, timeout: float) -> HTTPResponse:
"""Open an FCC-local request without consulting machine proxy settings."""
return _DIRECT_OPENER.open(request, timeout=timeout)
|