TeamsBotApplicationHostingExtensions.AddTeamsApiClient 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.
Registers the Teams ApiClient using a named HttpClient.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddTeamsApiClient(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string httpClientName);
static member AddTeamsApiClient : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddTeamsApiClient (services As IServiceCollection, httpClientName As String) As IServiceCollection
Parameters
- services
- IServiceCollection
The service collection.
- httpClientName
- String
The name of the registered HTTP client to use.
Returns
The service collection for chaining.
Remarks
The calling host must register the named HTTP client, ConversationClient, and UserTokenClient before resolving the API client.