From 5eab32646abc4c07ea6c236773c1c786bd0c20fc Mon Sep 17 00:00:00 2001 From: geographika Date: Mon, 13 Feb 2023 22:17:55 +0100 Subject: [PATCH] use build_get_url --- owslib/feature/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/owslib/feature/__init__.py b/owslib/feature/__init__.py index 64cb426a7..a838794b3 100644 --- a/owslib/feature/__init__.py +++ b/owslib/feature/__init__.py @@ -5,9 +5,8 @@ # # ============================================================================= -from urllib.parse import urlencode from owslib.crs import Crs -from owslib.util import log, Authentication +from owslib.util import log, Authentication, build_get_url from owslib.feature.schema import get_schema from owslib.feature.postrequest import PostRequest_1_1_0, PostRequest_2_0_0 @@ -205,7 +204,6 @@ def getGETGetFeatureRequest( if m.get("type").lower() == method.lower() ) ) - base_url = base_url if base_url.endswith("?") else base_url + "?" request = {"service": "WFS", "version": self.version, "request": "GetFeature"} @@ -244,9 +242,7 @@ def getGETGetFeatureRequest( if outputFormat is not None: request["outputFormat"] = outputFormat - data = urlencode(request, doseq=True) - - return base_url + data + return build_get_url(base_url, request) def getPOSTGetFeatureRequest( self,