export default async function(req: Request): Promise<Response> {
const query = new URL(req.url).searchParams;
const name = query.get("name") || (await req.json().catch(() => ({}))).name || "you";
return new Response(`<h1>Hi ${name}!</h1>`, {
headers: { "Content-Type": "text/html" },
});
}