allow headers as hashref or arrayref