Module

x/hono/request.ts>HonoRequest#header

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
method HonoRequest.prototype.header
import { HonoRequest } from "https://dotland.deno.dev/x/hono@v4.2.2/request.ts";

.header() can get the request header value.

Examples

Example 1

app.get('/', (c) => {
  const userAgent = c.req.header('User-Agent')
})

Parameters

name: string

Returns

string | undefined

Returns

Record<string, string>