Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno_koa/mod.ts>Response#has

A middleware framework for Deno's http serve🦕. Transplanted from Koa with ❤️
Latest
method Response.prototype.has
import { Response } from "https://deno.land/x/deno_koa@v1.0.4/mod.ts";

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

Examples:

this.has('Content-Type');
// => true

this.get('content-type');
// => true

Parameters

field: string

Returns

boolean