Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion monailabel/datastore/xnat.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def _login_xnat(self):
logger.info("XNAT:: Logged in XNAT")

def _request_get(self, url):
return self.xnat_session.get(url, allow_redirects=True)
return self.xnat_session.get(url, auth=self.auth, allow_redirects=True)

def _request_post(self, url):
return self.xnat_session.post(url, auth=self.auth, allow_redirects=True)
Expand All @@ -329,6 +329,7 @@ def _request_put(self, url, data, type):
data=data,
params={"overwrite": "true", "type": type},
headers={"Content-Type": "application/octet-stream"},
auth=self.auth,
allow_redirects=True,
)
if response.status_code != 200: # failed call
Expand Down
Loading