Discord.https - v3.0.16
    Preparing search index...

    Interface HttpAdapter

    Represents a generic HTTP adapter for handling incoming requests and responses.

    Required Methods:

    • listen(endpoint, handler, ...args) – Starts listening on a given endpoint and routes incoming requests to the provided handler.
    • getRequestBody(req) – Retrieves the raw body of a request as a Uint8Array.

    Any adapter must implement these methods to be compatible with this library.

    Prebuilt adapters are available:

    interface HttpAdapter {
        getRequestBody(req: any): Promise<Uint8Array<ArrayBufferLike>>;
        listen(
            endpoint: string,
            handler: (req: any, res: any) => Promise<any>,
            ...args: any[],
        ): any;
    }
    Index

    Methods

    • Parameters

      • req: any

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Parameters

      • endpoint: string
      • handler: (req: any, res: any) => Promise<any>
      • ...args: any[]

      Returns any