Module

x/hono/request.ts>HonoRequest#header

Web Framework built on Web Standards
Extremely Popular
Go to Latest
method HonoRequest.prototype.header
import { HonoRequest } from "https://dotland.deno.dev/x/hono@v4.2.6/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>