Skip to main content

hasHeader

method Http2ServerResponse.prototype.hasHeader
Jump to headingHttp2ServerResponse.prototype.hasHeader(name: string): boolean

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');

Parameters Jump to heading

Jump to headingname: string

Return Type Jump to heading

boolean
Back to top