BotFrameworkHttpClient 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
Use BotFrameworkAuthentication.CreateBotFrameworkClient() to obtain a client and perform the operations that were accomplished through BotFrameworkHttpClient.
使用 BotFramework HTTP 通訊協定安全地將活動張貼到 Bot 的類別。
[System.Obsolete("Use `BotFrameworkAuthentication.CreateBotFrameworkClient()` to obtain a client and perform the operations that were accomplished through `BotFrameworkHttpClient`.", false)]
public class BotFrameworkHttpClient : Microsoft.Bot.Builder.Skills.BotFrameworkClient
[<System.Obsolete("Use `BotFrameworkAuthentication.CreateBotFrameworkClient()` to obtain a client and perform the operations that were accomplished through `BotFrameworkHttpClient`.", false)>]
type BotFrameworkHttpClient = class
inherit BotFrameworkClient
Public Class BotFrameworkHttpClient
Inherits BotFrameworkClient
- 繼承
- 衍生
- 屬性
備註
這個類別可用來使用 Bot Framework HTTP 通訊協定安全地將活動張貼至 Bot。 有兩種使用模式:* 將活動轉發給技能(Bot => 作為技能的機器人),透過 PostActivityAsync(fromBotId, toBotId, endpoint, serviceUrl, activity)完成;* 將活動發佈給自己(External service => Bot),透過 PostActivityAsync(botId, endpoint, activity) 進行。後者用於外部服務,例如網頁工作,需要使用機器人自身憑證向機器人發布活動。
建構函式
| 名稱 | Description |
|---|---|
| BotFrameworkHttpClient(HttpClient, ICredentialProvider, IChannelProvider, ILogger) |
已淘汰.
初始化 BotFrameworkHttpClient 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| AppCredentialMapCache |
已淘汰.
取得快取 appCredentials 以加速取得令牌(除非過期,否則不會要求令牌)。 AppCredentials 是使用 appId + scope 快取的(只有當應用程式認證用來呼叫技能時,才會使用這個最後一個參數)。 |
| ChannelProvider |
已淘汰.
取得這個配接器的通道提供者。 |
| CredentialProvider |
已淘汰.
取得這個配接器的認證提供者。 |
| HttpClient |
已淘汰.
取得這個配接器的 HttpClient。 |
| Logger |
已淘汰.
拿到這個轉接器的記錄器。 |
方法
| 名稱 | Description |
|---|---|
| BuildCredentialsAsync(String, String) |
已淘汰.
邏輯用來建立 AppCredentials 一個物件,用於取得此 HttpClient 的標記。 |
| Dispose() |
已淘汰.
使用 BotFramework HTTP 通訊協定安全地將活動張貼到 Bot 的類別。 (繼承來源 BotFrameworkClient) |
| Dispose(Boolean) |
已淘汰.
受保護的處置模式實作。 (繼承來源 BotFrameworkClient) |
| PostActivityAsync(String, String, Uri, Uri, String, Activity, CancellationToken) |
已淘汰.
將活動轉送至技能(Bot)。 |
| PostActivityAsync(String, Uri, Activity, CancellationToken) |
已淘汰.
使用 Bot 的認證將活動張貼至 Bot。 |
| PostActivityAsync<T>(String, String, Uri, Uri, String, Activity, CancellationToken) |
已淘汰.
將活動轉送至技能(Bot)。 |
| PostActivityAsync<T>(String, Uri, Activity, CancellationToken) |
已淘汰.
使用 Bot 的認證將活動張貼至 Bot。 |