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

x/opine/src/response.ts>Response#append

Minimalist web framework for Deno ported from ExpressJS.
Latest
method Response.prototype.append
import { Response } from "https://deno.land/x/opine@2.3.4/src/response.ts";

Append additional header field with value val. Value can be either a string or an array of string.

Example:

res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); res.append('Warning', '199 Miscellaneous warning'); res.append("cache-control", ["public", "max-age=604800", "immutable"]);

Parameters

field: string
value: string | string[]

Returns

this

for chaining