in ez_wsi_dicomweb/dicom_web_interface.py [0:0]
def _inner_func() -> None:
headers = {'Accept': 'application/dicom; transfer-syntax=*'}
self.credentials().apply(headers)
try:
with requests.Session() as session:
response = session.get(
instance_path.complete_url, headers=headers, stream=True
)
response.raise_for_status()
for chunk in response.iter_content(chunk_size=max(1, chunk_size)):
output_stream.write(chunk)
except requests.exceptions.HTTPError as exp:
ez_wsi_errors.raise_ez_wsi_http_exception(exp.response.reason, exp)