Skip to content

Commit

Permalink
Merge branch 'fix/requests-headers-overwritten' into 'main'
Browse files Browse the repository at this point in the history
Bug fix: User headers are now prioritized over default headers

See merge request cpes/european-projects/enershare/tsg-client!79
  • Loading branch information
itsjrsa committed Jun 5, 2024
1 parent 3629c8c commit d1f5c2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tsg_client/controllers/RequestController.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def request(
if headers is None:
headers = self.headers
else:
headers.update(self.headers)
for key, value in self.headers.items():
if key not in headers:
headers[key] = value

if base_url is None:
base_url = self.base_url
Expand Down

0 comments on commit d1f5c2a

Please sign in to comment.