Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Readme

Returning HTML from the Val Town Web API

This just lets you use the standard Response object with our Web API to return an HTML response from this Val.

1
2
3
4
5
6
export const htmlExample = () =>
new Response("<h1>Helloggg, world</h1>", {
headers: {
"Content-Type": "text/html",
},
});
mmabrouk-htmlexample.web.val.run
April 9, 2024