Class ConversationRequestOptionsInternal

Holds the callable functions of a Conversation.

This class is used internally by the library and is not meant to be instantiated by consumers of the library.

Hierarchy

  • ConversationRequestOptions

Constructors

Properties

headers: undefined | Record<string, string>
pluginService: ConversationPluginService<ConversationPlugin<string, any, any>[]>
proxy: undefined | {
    auth?: { username: string; password: string; };
    host: string;
    port?: number;
    protocol?: "http" | "https";
}

Type declaration

  • Optional auth?: { username: string; password: string; }
  • host: string
  • Optional port?: number
  • Optional protocol?: "http" | "https"

Methods

  • Returns the current request options.

    Returns {
        headers: undefined | Record<string, string>;
        proxy: undefined | {
            auth?: { username: string; password: string; };
            host: string;
            port?: number;
            protocol?: "http" | "https";
        };
    }

    • headers: undefined | Record<string, string>
    • proxy: undefined | {
          auth?: { username: string; password: string; };
          host: string;
          port?: number;
          protocol?: "http" | "https";
      }
  • Sets new request options to be used as defaults for all HTTP requests made by this conversation.

    Parameters

    • requestOptions: {
          headers?: Record<string, string>;
          proxy?: { host: string; port?: number | undefined; protocol?: "http" | "https" | undefined; auth?: { username: string; password: string; } | undefined; };
      }

      The new request options to use.

      • Optional headers?: Record<string, string>
      • Optional proxy?: { host: string; port?: number | undefined; protocol?: "http" | "https" | undefined; auth?: { username: string; password: string; } | undefined; }
    • merge: boolean = false

      Set to true to shallow merge the new request options with the existing request options instead of replacing them.

    Returns void

  • Serializes the ConversationRequestOptions to JSON.

    Returns {
        headers?: Record<string, string>;
        proxy?: { host: string; port?: number | undefined; protocol?: "http" | "https" | undefined; auth?: { username: string; password: string; } | undefined; };
    }

    A JSON representation of the ConversationRequestOptions instance.

    • Optional headers?: Record<string, string>
    • Optional proxy?: { host: string; port?: number | undefined; protocol?: "http" | "https" | undefined; auth?: { username: string; password: string; } | undefined; }

Generated using TypeDoc