import requests


def post_xml_request(
        request_path: str, data: str, get_raw_stream: bool = False) -> requests.Response:
    """ Send a POST request with the text/xml content type and return
    the response.
    """
    return requests.post(
        "http://" + request_path, data=data.encode("utf-8"),
        headers={"Content-type": "text/xml; charset=utf-8"},
        stream=get_raw_stream)