print headers before sending