(self, method: str, url: str, headers: dict[str, str] | None = None)
| 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) |
no test coverage detected