def flatten_request_header(header):
    """
    Transform a dict representing header parameters into a flat string of
    comma separated parameters suitable for inserting into the actual
    headers
    """
    flattened_header = ''
    if isinstance(header, dict):
        contents = []
        for content_key, content_val in header.items():
            contents.append('%s="%s"' % (content_key, content_val))

        flattened_header = ','.join(contents)
    else:
        flattened_header = str(header)

    return flattened_header