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

x/doa/request.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/doa@v1.0.0/request.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