BotFrameworkHttpClient class

警告

现已弃用此 API。

Use BotFrameworkAuthentication.createBotFrameworkClient() to obtain a client and perform the operations that were accomplished through BotFrameworkHttpClient. HttpClient for calling skills from a Node.js BotBuilder V4 SDK bot.

构造函数

BotFrameworkHttpClient(ICredentialProvider, string)

创建 BotFrameworkHttpClient 类的新实例

方法

postActivity<T>(string, string, string, string, string, Activity)

将活动转发到另一个机器人。

构造函数详细信息

BotFrameworkHttpClient(ICredentialProvider, string)

创建 BotFrameworkHttpClient 类的新实例

new BotFrameworkHttpClient(credentialProvider: ICredentialProvider, channelService?: string)

参数

credentialProvider

ICredentialProvider

ICredentialProvider 的实例。

channelService

string

可选。 通道服务。

方法详细信息

postActivity<T>(string, string, string, string, string, Activity)

将活动转发到另一个机器人。

function postActivity<T>(fromBotId: string, toBotId: string, toUrl: string, serviceUrl: string, conversationId: string, activity: Activity): Promise<InvokeResponse<T>>

参数

fromBotId

string

发送活动的机器人的 MicrosoftAppId。

toBotId

string

接收活动的机器人的 MicrosoftAppId。

toUrl

string

接收活动的机器人的 URL。

serviceUrl

string

技能主机的回调 URL。

conversationId

string

用于技能会话的会话 ID。

activity

Activity

要转发的活动。

返回

Promise<InvokeResponse<T>>

表示异步操作的承诺。