diff --git a/CHANGES.rst b/CHANGES.rst index 0ebf10b..87de6d0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +0.16.1 (29-03-2023) +------------------- + +- Add user agent header to geo.api calls (#190) + 0.16.0 (29-03-2023) ------------------- diff --git a/crabpy/gateway/capakey.py b/crabpy/gateway/capakey.py index 01c2235..f5e8eda 100644 --- a/crabpy/gateway/capakey.py +++ b/crabpy/gateway/capakey.py @@ -26,6 +26,8 @@ def capakey_rest_gateway_request(url, headers={}, params={}): :returns: Result of the call. """ try: + # calls to geoservices give a 403 if the user-agent is not set + headers["user-agent"] = "*" res = requests.get(url, headers=headers, params=params) res.raise_for_status() return res diff --git a/setup.py b/setup.py index 9d2187d..7635cbb 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name='crabpy', - version='0.16.0', + version='0.16.1', description='Interact with geographical webservices by Informatie Vlaanderen.', long_description=open('README.rst').read() + '\n\n' + open('CHANGES.rst').read(),