response.hasHeader(name)


如果 name 标识的标头当前设置在传出标头中,则返回 true。 标头名称匹配不区分大小写。

const hasContentType = response.hasHeader('content-type');

Returns true if the header identified by name is currently set in the outgoing headers. The header name matching is case-insensitive.

const hasContentType = response.hasHeader('content-type');