def retrieve_content_type_header()

in src/sagemaker_inference/utils.py [0:0]


def retrieve_content_type_header(request_property):
    """Retrieve Content-Type header from incoming request.

    This function handles multiple spellings of Content-Type based on the presence of
    the dash and initial capitalization in each respective word.

    Args:
        request_property (dict): incoming request metadata

    Returns:
        (str): the request content type.

    """
    for key in request_property:
        if CONTENT_TYPE_REGEX.match(key):
            return request_property[key]

    return None