• Used to define a Connector HTTP handler. Accepts a handler fuction which takes a single Request parameter and should return a Response instance.

    Parameters

    Returns RequestHandler

    See

    Handling HTTP Requests

    Example

    import { defineHTTPHandler } from "@rollout/framework";

    export const http = defineHTTPHandler((request) => {
    return Response.json(`Hello from ${request.url}!`);
    });