MCPcopy
hub / github.com/commaai/openpilot / _request

Method _request

tools/lib/url_file.py:91–95  ·  view source on GitHub ↗
(self, method: str, url: str, headers: dict[str, str] | None = None)

Source from the content-addressed store, hash-verified

89 pass
90
91 def _request(self, method: str, url: str, headers: dict[str, str] | None = None) -> BaseHTTPResponse:
92 try:
93 return URLFile.pool_manager().request(method, url, timeout=self._timeout, headers=headers)
94 except MaxRetryError as e:
95 raise URLFileException(f"Failed to {method} {url}: {e}") from e
96
97 def get_length_online(self) -> int:
98 response = self._request('HEAD', self._url)

Callers 2

get_length_onlineMethod · 0.95
get_multi_rangeMethod · 0.95

Calls 3

URLFileExceptionClass · 0.85
pool_managerMethod · 0.80
requestMethod · 0.45

Tested by

no test coverage detected