Public
Like
2
HTTP_examples
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v58View latest version
HTTP triggers let you expose an API or website from your file.
They are built on the web-standard Request and Response objects, so are compatible with a number of web frameworks like Hono and Peko.
These handlers need to export a function that takes a Request object as the first parameter and returns a Response object. The function can be asynchronous.