headers_to_dict snippet