Creates an HTML response.

  • Parameters

    • html: string

      The response body as an HTML string.

    • options: ResponseInit = {}

      Optional response initialization options.

    Returns Response

    A Response object with the specified HTML content.

    Example usage:

    import { start, router, html } from "@pulsar-http/core";

    const routes = [
    router.get("/", async () => html("<h1>Hello, World!</h1>")),
    ];

    start({ routes });

    In this example, the response will have an HTML body with the content <h1>Hello, World!</h1>.