with requests.request("POST", url_base, json=task, headers=headers) as report:
print('report: ', report)
with requests.get('http://httpbin.org/get', stream=True) as r:
# Do things with the response here.
r = ''
while r == '':
try:
r = requests.get(Url, headers = headers)
except (requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError) as err:
log_(err + ' Put to sleep before retrying.')
time.sleep(100)
continue