# Path: dhis2_core/src/dhis2/core/inventory.py
# class HostResolved(BaseModel):
#     type: Union[HostType, str] = HostType.dhis2
#     key: str
#     baseUrl: str
#     headers: Mapping[str, str] = {}
#     params: Mapping[str, str] = {}
#     auth: Union[NoopAuthtype, BasicAuthtype]


import json
import logging
import sys
import requests
from copy import deepcopy
from enum import Enum
from typing import Dict, Tuple, Union
from requests.models import Response  # noqa
from .inventory import HostResolved
        url = self._get_url(path)
        headers = self._get_headers(headers)
        auth = self._get_auth()
        params = self._get_params(params)

        log.info(f"Starting GET request '{url}' with params='{params}'")

        response = requests.get(
            url=url,
            headers=headers,
            params=params,
            auth=auth,
        )

        log.info(f"Finished GET request '{response.request.url}'' with status code '{response.status_code}''")

        if not response.ok:
            return self._handle_errors(response)

        data = None

        if MediaFormat.json == self.format:
            data = response.json()
        else:
            data = response.text

        return data

    def post(
        self,

# Path: dhis2_core/src/dhis2/core/inventory.py
# class HostResolved(BaseModel):
#     type: Union[HostType, str] = HostType.dhis2
#     key: str
#     baseUrl: str
#     headers: Mapping[str, str] = {}
#     params: Mapping[str, str] = {}
#     auth: Union[NoopAuthtype, BasicAuthtype]


# Path: dhis2_core/src/dhis2/core/http.py
import json
import logging
import sys
import requests
from copy import deepcopy
from enum import Enum
from typing import Dict, Tuple, Union
from requests.models import Response  # noqa
from .inventory import HostResolved

        url = self._get_url(path)
        headers = self._get_headers(headers)
        auth = self._get_auth()
        params = self._get_params(params)

        log.info(f"Starting GET request '{url}' with params='{params}'")

        response = requests.get(
            url=url,
            headers=headers,
            params=params,
            auth=auth,
        )

        log.info(f"Finished GET request '{response.request.url}'' with status code '{response.status_code}''")

        if not response.ok:
            return self._handle_errors(response)

        data = None

        if MediaFormat.json == self.format:
            data = response.json()
        else:
            data = response.text

        return data

    def post(
        self,

        path,