diff --git a/osc/util/models.py b/osc/util/models.py index be41e5b92..868440e18 100644 --- a/osc/util/models.py +++ b/osc/util/models.py @@ -756,12 +756,20 @@ def from_xml(cls, root: ET.Element, *, apiurl: Optional[str] = None): return obj @classmethod - def xml_request(cls, method: str, apiurl: str, path: List[str], query: Optional[dict] = None, data: Optional[str] = None) -> urllib3.response.HTTPResponse: + def xml_request( + cls, + method: str, + apiurl: str, + path: List[str], + query: Optional[dict] = None, + headers: Optional[str] = None, + data: Optional[str] = None, + ) -> urllib3.response.HTTPResponse: from ..connection import http_request from ..core import makeurl url = makeurl(apiurl, path, query) # TODO: catch HTTPError and return the wrapped response as XmlModel instance - return http_request(method, url, data=data) + return http_request(method, url, headers=headers, data=data) def do_update(self, other: "XmlModel") -> None: """