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

x/opine/src/request.ts>WrappedRequest#get

Fast, minimalist web framework for Deno ported from ExpressJS.
Go to Latest
method WrappedRequest.prototype.get
import { WrappedRequest } from "https://deno.land/x/opine@2.2.0/src/request.ts";

Return request header.

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

Examples:

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

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

req.get('Something');
// => undefined

Aliased as req.header().

Parameters

name: string

Returns

string | undefined