Skip to content

Dependency injection

Register the client with IServiceCollection. Uses IHttpClientFactory and the named client TypeSafe.AI.

services.AddTypeSafeClient(options =>
{
options.ApiKey = builder.Configuration["TYPESAFE_API_KEY"];
});
public sealed class Tickets(ITypeSafeClient typesafe)
{
// inject and call SystemOneAsync
}

See TypeSafeServiceCollectionExtensions and ITypeSafeClient.

MIT · Copyright (c) Dario Kondratiuk. · not affiliated with TypeSafe beyond being a client of the public API