新增于: v7.7.0
如果 name
标识的标头当前设置在传出标头中,则返回 true
。标头名称匹配不区分大小写。
¥Returns true
if the header identified by name
is currently set in the
outgoing headers. The header name matching is case-insensitive.
const hasContentType = request.hasHeader('content-type');