Beignet API reference
    Preparing search index...

    Type Alias OnRequestHook<Ports, C>

    OnRequestHook: (
        args: {
            contract: C;
            params: Record<string, string>;
            ports: Ports;
            req: HttpRequestLike;
        },
    ) => MaybePromise<HttpResponse | undefined>

    Hook that runs after a route is matched but before request parsing and context creation.

    Returning a response short-circuits the rest of the request pipeline.

    Type Parameters

    Type Declaration