Skip to content

Commit b13a4b0

Browse files
committed
introduce the SUPPORTED_API_CLIENT variable
1 parent 7c67659 commit b13a4b0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/qgis_geonode/apiclient/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
import importlib
33
import typing
44

5+
SUPPORTED_API_CLIENT = "/api/v2/"
6+
57

68
def is_api_client_supported(base_url: str) -> bool:
79
"""
8-
Returns True if /api/v2/ endpoint provides a valid response.
9-
No version string involved.
10+
Returns True if SUPPORTED_API_CLIENT endpoint provides a valid response.
1011
"""
11-
url = f"{base_url.rstrip('/')}/api/v2/"
12+
url = f"{base_url.rstrip('/')}{SUPPORTED_API_CLIENT}"
1213
try:
1314
resp = requests.get(url, timeout=5)
1415
resp.raise_for_status()

0 commit comments

Comments
 (0)