import six


def response_parameters_from_config(response_config):
    """
    Get custom response from configuration.

    :param response_config: the configuration of the response
    :return: code, headers, content_type, body, json_body
    """
    h = response_config.get("headers", {})
    headers = [(k, v) for k, v in six.iteritems(h)]
    status = response_config.get("status", None)
    status_code = response_config.get("status_code", None)
    body = response_config.get("body", None)
    json_body = response_config.get("json_body", None)
    return status, status_code, headers, body, json_body