Modified method get_data to be sensitive to headers