MCPcopy
hub / github.com/urllib3/urllib3 / _is_method_retryable

Method _is_method_retryable

src/urllib3/util/retry.py:403–409  ·  view source on GitHub ↗

Checks if a given HTTP method should be retried upon, depending if it is included in the allowed_methods

(self, method: str)

Source from the content-addressed store, hash-verified

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

Callers 2

is_retryMethod · 0.95
incrementMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected