A response generated by the matched route handler, or a default response if no route is matched.
Example usage:
import { router, text, processRoute } from "@pulsar-http/core";
const myRoute = router.get('/api/users', async () => text('User List'));
(async () => {
// Fake the request for the example
const request = new Request('http://localhost:3000/api/users');
const response = await processRoute(myRoute, request);
})();
In this example, response
will be a Response
object with the body "User List".
Processes a matched route and generates a response.