substrate-substratebadge.web.val.run
substrate avatar
promptHeader
@substrate
HTTP
Prompt header import promptHeader from "https://esm.town/v/substrate/promptHeader"; export default async function(req: Request): Promise<Response> { const searchParams = new URL(req.url).searchParams; const { prompt = "foo" } = Object.fromEntries(searchParams); const html = ` ${promptHeader(prompt)} <div>content</div> `; return new Response(html, { headers: { "Content-Type": "text/html", }, }); }
1
Next
v74
July 10, 2024