Checks if a given HTTP method should be retried upon, depending if it is included in the allowed_methods
(self, method: str)
| 401 | return isinstance(err, (ReadTimeoutError, ProtocolError)) |
| 402 | |
| 403 | def _is_method_retryable(self, method: str) -> bool: |
| 404 | """Checks if a given HTTP method should be retried upon, depending if |
| 405 | it is included in the allowed_methods |
| 406 | """ |
| 407 | if self.allowed_methods and method.upper() not in self.allowed_methods: |
| 408 | return False |
| 409 | return True |
| 410 | |
| 411 | def is_retry( |
| 412 | self, method: str, status_code: int, has_retry_after: bool = False |