Skip to content

Commit 3806289

Browse files
authored
added auth param to _request_get and _request_put (#1838)
1 parent d889686 commit 3806289

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

monailabel/datastore/xnat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def _login_xnat(self):
318318
logger.info("XNAT:: Logged in XNAT")
319319

320320
def _request_get(self, url):
321-
return self.xnat_session.get(url, allow_redirects=True)
321+
return self.xnat_session.get(url, auth=self.auth, allow_redirects=True)
322322

323323
def _request_post(self, url):
324324
return self.xnat_session.post(url, auth=self.auth, allow_redirects=True)
@@ -329,6 +329,7 @@ def _request_put(self, url, data, type):
329329
data=data,
330330
params={"overwrite": "true", "type": type},
331331
headers={"Content-Type": "application/octet-stream"},
332+
auth=self.auth,
332333
allow_redirects=True,
333334
)
334335
if response.status_code != 200: # failed call

0 commit comments

Comments
 (0)