Skip to content

Commit

Permalink
Also set Accept header when updating token
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans committed Mar 13, 2024
1 parent b46417a commit c5e0360
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hdx/utilities/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,12 @@ def update_bearer_token(self, bearer_token: str) -> None:
Returns:
None
"""
self.session.headers["Authorization"] = f"Bearer {bearer_token}"
self.session.headers.update(
{
"Accept": "application/json",
"Authorization": f"Bearer {bearer_token}",
}
)

def hash_stream(self, url: str) -> str:
"""Stream file from url and hash it using MD5. Must call setup method
Expand Down

0 comments on commit c5e0360

Please sign in to comment.