SkillHttpClient.PostActivityAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
PostActivityAsync(String, BotFrameworkSkill, Uri, Activity, CancellationToken) |
Forwards an activity to a skill (bot). |
PostActivityAsync<T>(String, BotFrameworkSkill, Uri, Activity, CancellationToken) |
Forwards an activity to a skill (bot). |
PostActivityAsync<T>(String, String, BotFrameworkSkill, Uri, Activity, CancellationToken) |
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity. |
PostActivityAsync(String, BotFrameworkSkill, Uri, Activity, CancellationToken)
Forwards an activity to a skill (bot).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse> PostActivityAsync (string fromBotId, Microsoft.Bot.Builder.Skills.BotFrameworkSkill toSkill, Uri callbackUrl, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken);
override this.PostActivityAsync : string * Microsoft.Bot.Builder.Skills.BotFrameworkSkill * Uri * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse>
Public Overridable Function PostActivityAsync (fromBotId As String, toSkill As BotFrameworkSkill, callbackUrl As Uri, activity As Activity, cancellationToken As CancellationToken) As Task(Of InvokeResponse)
Parameters
- fromBotId
- String
The MicrosoftAppId of the bot sending the activity.
- toSkill
- BotFrameworkSkill
An instance of BotFrameworkSkill.
- callbackUrl
- Uri
The callback Uri.
- activity
- Activity
activity to forward.
- cancellationToken
- CancellationToken
cancellation Token.
Returns
Async task with optional invokeResponse.
Applies to
PostActivityAsync<T>(String, BotFrameworkSkill, Uri, Activity, CancellationToken)
Forwards an activity to a skill (bot).
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<T>> PostActivityAsync<T> (string fromBotId, Microsoft.Bot.Builder.Skills.BotFrameworkSkill toSkill, Uri callbackUrl, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken);
override this.PostActivityAsync : string * Microsoft.Bot.Builder.Skills.BotFrameworkSkill * Uri * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<'T>>
Public Overridable Function PostActivityAsync(Of T) (fromBotId As String, toSkill As BotFrameworkSkill, callbackUrl As Uri, activity As Activity, cancellationToken As CancellationToken) As Task(Of InvokeResponse(Of T))
Type Parameters
- T
type of the InvokeResponse result.
Parameters
- fromBotId
- String
The MicrosoftAppId of the bot sending the activity.
- toSkill
- BotFrameworkSkill
An instance of BotFrameworkSkill.
- callbackUrl
- Uri
The callback Uri.
- activity
- Activity
activity to forward.
- cancellationToken
- CancellationToken
cancellation Token.
Returns
Async task with optional invokeResponse of type T.
Applies to
PostActivityAsync<T>(String, String, BotFrameworkSkill, Uri, Activity, CancellationToken)
Uses the SkillConversationIdFactory to create or retrieve a Skill Conversation Id, and sends the activity.
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<T>> PostActivityAsync<T> (string originatingAudience, string fromBotId, Microsoft.Bot.Builder.Skills.BotFrameworkSkill toSkill, Uri callbackUrl, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken);
override this.PostActivityAsync : string * string * Microsoft.Bot.Builder.Skills.BotFrameworkSkill * Uri * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.InvokeResponse<'T>>
Public Overridable Function PostActivityAsync(Of T) (originatingAudience As String, fromBotId As String, toSkill As BotFrameworkSkill, callbackUrl As Uri, activity As Activity, cancellationToken As CancellationToken) As Task(Of InvokeResponse(Of T))
Type Parameters
- T
The type of body in the InvokeResponse.
Parameters
- originatingAudience
- String
The oauth audience scope, used during token retrieval. (Either https://api.botframework.com or bot app id.)
- fromBotId
- String
The MicrosoftAppId of the bot sending the activity.
- toSkill
- BotFrameworkSkill
The skill to create the conversation Id for.
- callbackUrl
- Uri
The callback Url for the skill host.
- activity
- Activity
The activity to send.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
Async task with invokeResponse.