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

x/ayonli_jsext/http/internal.ts>withHeaders

A JavaScript extension package for building strong and modern applications.
Latest
function withHeaders
import { withHeaders } from "https://deno.land/x/ayonli_jsext@v0.9.72/http/internal.ts";

Returns a new request handler that wraps the given one so that we can add extra headers to the response.

Type Parameters

A extends any[]

Parameters

handle: (...args: A) => Response | Promise<Response>
optional
headers: HeadersInit | null | undefined = [UNSUPPORTED]

Returns

(...args: A) => Promise<Response>