Creating Plot Twists
    Preparing search index...

    Type Alias WebhookRequest

    Represents an incoming webhook request.

    This object is passed to webhook callback functions and contains all the information about the HTTP request that triggered the webhook.

    async onWebhookReceived(request: WebhookRequest, context: any) {
    console.log(`${request.method} request received`);
    console.log("Headers:", request.headers);
    console.log("Query params:", request.params);
    console.log("Body:", request.body);
    console.log("Context:", context);
    }
    type WebhookRequest = {
        method: string;
        headers: Record<string, string>;
        params: Record<string, string>;
        body: any;
    }
    Index

    Properties

    method: string

    HTTP method of the request (GET, POST, etc.)

    headers: Record<string, string>

    HTTP headers from the request

    params: Record<string, string>

    Query string parameters from the request URL

    body: any

    Request body (parsed as JSON if applicable)