Static Response
You can use this document to learn how to send a static response.
In the following example, the route is: hello-world
Review the following sample script:
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
return new Response("Hello World", { status: "200" });
}
You can access your script with any of the delivery domains on your account.
Based on the above example, you can access the script with: https://domain.com/hello-world
Updated 5 months ago