|
|
|
|
|
|
|
|
response = client.request(method=method, url=url, **kwargs) |
|
|
response = client.request(method=method, url=url, **kwargs) |
|
|
|
|
|
|
|
|
if response.status_code not in STATUS_FORCELIST: |
|
|
if response.status_code not in STATUS_FORCELIST: |
|
|
if stream: |
|
|
|
|
|
return response.iter_bytes() |
|
|
|
|
|
return response |
|
|
return response |
|
|
else: |
|
|
else: |
|
|
logging.warning(f"Received status code {response.status_code} for URL {url} which is in the force list") |
|
|
logging.warning(f"Received status code {response.status_code} for URL {url} which is in the force list") |