Skip to content

Commit

Permalink
use build_get_url
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Feb 13, 2023
1 parent 45cfb36 commit 5eab326
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions owslib/feature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5eab326

Please sign in to comment.