Skip to content

Commit

Permalink
Fixes #248
Browse files Browse the repository at this point in the history
  • Loading branch information
claeyswo authored Apr 2, 2024
1 parent f7592f3 commit 81efe1d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.3.2 (02-04-2024)
------------------

- Set x-api-key on all requests (#248)

1.3.1 (23-11-2023)
------------------

Expand Down
6 changes: 5 additions & 1 deletion crabpy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ def _get_list(self, url, response_key, params=None):

def _get(self, url, params=None):
try:
response = self.session.get(f"{self.base_url}{url}", params=params)
response = self.session.get(
f"{self.base_url}{url}",
params=params,
headers=self.v2_header if "v2" in url else self.v1_header,
)
response.raise_for_status()
return response.json()
except RequestException as e:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="crabpy",
version="1.3.1",
version="1.3.2",
description="Interact with geographical webservices by Informatie Vlaanderen.",
long_description=open("README.rst").read() + "\n\n" + open("CHANGES.rst").read(),
author="Onroerend Erfgoed",
Expand Down

0 comments on commit 81efe1d

Please sign in to comment.