request.getRawHeaderNames()


返回一个包含当前输出原始头的唯一名称的数组。头名称以其原始大小写返回。

【Returns an array containing the unique names of the current outgoing raw headers. Header names are returned with their exact casing being set.】

request.setHeader('Foo', 'bar');
request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);

const headerNames = request.getRawHeaderNames();
// headerNames === ['Foo', 'Set-Cookie']