metatell Bot SDK - v2.0.0
    Preparing search index...
    interface DispatchHandler {
        onBodySent?(chunkSize: number, totalBytesSent: number): void;
        onComplete?(trailers: string[] | null): void;
        onConnect?(abort: (err?: Error) => void): void;
        onData?(chunk: Buffer): boolean;
        onError?(err: Error): void;
        onHeaders?(
            statusCode: number,
            headers: Buffer<ArrayBufferLike>[],
            resume: () => void,
            statusText: string,
        ): boolean;
        onRequestStart?(
            controller: Dispatcher.DispatchController,
            context: any,
        ): void;
        onRequestUpgrade?(
            controller: Dispatcher.DispatchController,
            statusCode: number,
            headers: IncomingHttpHeaders,
            socket: Duplex,
        ): void;
        onResponseData?(
            controller: Dispatcher.DispatchController,
            chunk: Buffer,
        ): void;
        onResponseEnd?(
            controller: Dispatcher.DispatchController,
            trailers: IncomingHttpHeaders,
        ): void;
        onResponseError?(
            controller: Dispatcher.DispatchController,
            error: Error,
        ): void;
        onResponseStart?(
            controller: Dispatcher.DispatchController,
            statusCode: number,
            headers: IncomingHttpHeaders,
            statusMessage?: string,
        ): void;
        onResponseStarted?(): void;
        onUpgrade?(
            statusCode: number,
            headers: string[] | Buffer<ArrayBufferLike>[] | null,
            socket: Duplex,
        ): void;
    }
    Index
    • Parameters

      • chunkSize: number
      • totalBytesSent: number

      Returns void

    • Parameters

      • trailers: string[] | null

      Returns void

    • Parameters

      • abort: (err?: Error) => void

      Returns void

    • Parameters

      • chunk: Buffer

      Returns boolean

    • Parameters

      • err: Error

      Returns void

    • Parameters

      • statusCode: number
      • headers: Buffer<ArrayBufferLike>[]
      • resume: () => void
      • statusText: string

      Returns boolean

    • Returns void

    • Parameters

      Returns void