import fetch from "node-fetch"; import { CommunicationProtocolEnum } from "../../.."; import IClient from "../../../interfaces/Client/IClient"; import { DaprClientOptions } from "../../../types/DaprClientOptions"; import { THTTPExecuteParams } from "../../../types/http/THTTPExecuteParams.type"; export default class HTTPClient implements IClient { private isInitialized; private readonly client; private readonly clientHost; private readonly clientPort; private readonly clientUrl; private readonly options; private readonly logger; private readonly httpAgent; private readonly httpsAgent; constructor(host?: string, port?: string, options?: DaprClientOptions); getClient(): typeof fetch; getClientHost(): string; getClientPort(): string; getClientUrl(): string; getClientCommunicationProtocol(): CommunicationProtocolEnum; getOptions(): DaprClientOptions; setIsInitialized(isInitialized: boolean): void; stop(): Promise; start(): Promise; executeWithApiVersion(apiVersion: string | undefined, url: string, params?: any): Promise; /** * * @param url The URL to call * @param params The parameters to pass to our URL * @param requiresInitialization If false, it doesn't require the Dapr sidecar to be started and might fail * @returns The result of the call */ execute(url: string, params?: THTTPExecuteParams | undefined | null, requiresInitialization?: boolean): Promise; }