Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_koa/mod.ts>Request#get

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

Return request header. If the header is not set, will return an empty string.

The Referrer header field is special-cased, both Referrer and Referer are interchangeable.

Examples:

this.get('Content-Type');
// => "text/plain"

this.get('content-type');
// => "text/plain"

this.get('Something');
// => ''

Parameters

field: string

Returns

string