The response body, which can be of type BodyInit or null.
The Content-Type header for the response. Defaults to an empty string.
Optional response initialization options.
A Response object with the specified body, headers, and options.
Example usage:
import { start, router, customResponse } from "@pulsar-http/core";
const routes = [
router.get("/api/users", async () => customResponse(JSON.stringify({ users: [] }), "application/json", { headers: { "X-Test": "123" } })),
];
start({ routes });
In this example, the response will have a JSON body, a Content-Type header of "application/json" and a custom "X-Test" header.
Creates a custom response with the specified body, content type, and options.