Skip to content

Commit bbf8ebc

Browse files
atomczakMoult
authored andcommitted
1 parent c1936b8 commit bbf8ebc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/bsdd/bsdd.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,16 +408,16 @@ def __init__(self):
408408
self.client_id = "4aba821f-d4ff-498b-a462-c2837dbbba70"
409409

410410
def get(self, endpoint, params=None, is_auth_required=False):
411-
headers = {}
411+
headers = {"User-Agent": "IfcOpenShell.bSDD.py/0.8.0"}
412412
if is_auth_required:
413-
headers = {"Authorization": "Bearer " + self.get_access_token()}
413+
headers["Authorization"] = "Bearer " + self.get_access_token()
414414
return requests.get(f"{self.baseurl}{endpoint}", timeout=10, headers=headers, params=params or None).json()
415415

416416
def _get_deprecated(self, endpoint, params=None, is_auth_required=False):
417-
headers = {}
417+
headers = {"User-Agent": "IfcOpenShell.bSDD.py/0.8.0"}
418418
old_baseurl = "https://bs-dd-api-prototype.azurewebsites.net/"
419419
if is_auth_required:
420-
headers = {"Authorization": "Bearer " + self.get_access_token()}
420+
headers["Authorization"] = "Bearer " + self.get_access_token()
421421
return requests.get(f"{old_baseurl}{endpoint}", timeout=10, headers=headers, params=params or None).json()
422422

423423
def post(self):

0 commit comments

Comments
 (0)