request.hasHeader(name)


如果由 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');