diff --git a/owslib/ogcapi/__init__.py b/owslib/ogcapi/__init__.py index ad1d29f6..4e77fc7b 100644 --- a/owslib/ogcapi/__init__.py +++ b/owslib/ogcapi/__init__.py @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022 Tom Kralidis +# Copyright (c) 2024 Tom Kralidis # # Author: Tom Kralidis # @@ -55,6 +55,8 @@ def __init__(self, url: str, json_: str = None, timeout: int = 30, self.json_ = json_ self.timeout = timeout self.headers = REQUEST_HEADERS + self.response_headers = None + if headers: self.headers.update(headers) self.auth = auth @@ -188,6 +190,7 @@ def _request(self, method: str = 'GET', path: str = None, raise RuntimeError(response.text) self.request = response.url + self.response_headers = response.headers if as_dict: if len(response.content) == 0: