|
|
@@ -100,6 +100,7 @@ class Item: |
|
|
|
raise ValueError('Incomplete URL and no baseUrl to join it with') |
|
|
|
else: |
|
|
|
url = self.baseUrl.join(url) |
|
|
|
originalUrl = url |
|
|
|
if responseHandler is None: |
|
|
|
responseHandler = self.defaultResponseHandler |
|
|
|
assert method in ('GET', 'POST'), 'method must be GET or POST' |
|
|
@@ -164,6 +165,10 @@ class Item: |
|
|
|
self.logger.error(f'Request for {url} failed {attempt} times') |
|
|
|
retResponse.qhistory = tuple(history) |
|
|
|
return retResponse |
|
|
|
elif action == ACTION_TOO_MANY_REDIRECTS: |
|
|
|
self.logger.error(f'Request for {url} (from {originalUrl}) exceeded redirect limit') |
|
|
|
retResponse.qhistory = tuple(history) |
|
|
|
return retResponse |
|
|
|
elif action == ACTION_RETRY: |
|
|
|
# Nothing to do, just go to the next cycle |
|
|
|
pass |
|
|
|