Creates a plain text response.

  • Parameters

    • text: string

      The response body as a plain text string.

    • options: ResponseInit = {}

      Optional response initialization options.

    Returns Response

    A Response object with the specified plain text content.

    Example usage:

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

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

    start({ routes });

    In this example, the response will have a plain text body with the content "Hello, World!".