Index: tools/findit/common/http_client.py |
diff --git a/tools/findit/common/http_client.py b/tools/findit/common/http_client.py |
index 82c358dedaae8a7724bd01d8be2bbd9057f6705a..75dd410d0e7eb425e2ed56c540e62ca4042eb449 100644 |
--- a/tools/findit/common/http_client.py |
+++ b/tools/findit/common/http_client.py |
@@ -10,9 +10,19 @@ class HttpClient(object): |
""" |
@staticmethod |
- def Get(url, params={}, timeout=None): |
+ def Get(url, params={}, timeout=60, retries=5, retry_interval=0.5, |
+ retry_if_not=None): |
"""Send a GET request to the given url with the given parameters. |
+ Args: |
+ url: the url to send request to. |
+ params: parameters to send as part of the http request. |
+ timeout: timeout for the http request, default is 60 seconds. |
+ retries: indicate how many retries before failing, default is 5. |
+ retry_interval: interval in second to wait before retry, default is 0.5. |
+ retry_if_not: a http status code. If set, retry only when the failed http |
+ status code is a different value. |
+ |
Returns: |
(status_code, data) |
state_code: the http status code in the response. |