aspnetcore-integration

Register ContentstackClient in ASP.NET Core DI with typed HttpClient configuration.

2|4|Updated Jun 30, 2021
One-click install
npx skills add https://github.com/contentstack/contentstack-management-dotnet --skill aspnetcore-integration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspnetcore-integration
Source: https://github.com/contentstack/contentstack-management-dotnet/tree/main/skills/aspnetcore-integration
Command: npx skills add https://github.com/contentstack/contentstack-management-dotnet --skill aspnetcore-integration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables straightforward integration of the Contentstack Management .NET SDK into ASP.NET Core applications by providing DI-friendly registration and HttpClient configuration.

Core Features & Use Cases

  • DI registration extensions for ContentstackClient (AddContentstackClient) with an option to pass ContentstackClientOptions.
  • Typed HttpClient configuration via AddHttpClient<ContentstackClient> to align with IHttpClientFactory patterns.
  • Compatibility with Contentstack.Management.Core as the core dependency and standard ASP.NET Core hosting practices.

Quick Start

Register ContentstackClient in the ASP.NET Core DI container using AddContentstackClient and configure HttpClientFactory for HTTP calls.

Frequently Asked Questions about aspnetcore-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register the Contentstack Management Client in ASP.NET Core dependency injection?

Register the Contentstack Management Client in ASP.NET Core dependency injection using the AddContentstackClient extension method, configuring the service container with optional ContentstackClientOptions to customize client behavior and authentication.

Does Contentstack.Management.Core work with IHttpClientFactory in dotnet?

Yes, Contentstack.Management.Core works with IHttpClientFactory in dotnet by applying typed HttpClient configuration. The integration uses AddHttpClient<ContentstackClient> to align with standard ASP.NET Core HTTP management patterns for reliable API calls.

What is the best way to configure a typed HttpClient for Contentstack in ASP.NET Core?

Configure a typed HttpClient for Contentstack in ASP.NET Core using the AddContentstackClient extension, which leverages AddHttpClient<ContentstackClient> to provide centralized client management and DI-friendly registration.

Do I need the Contentstack.Management.Core package to use this ASP.NET Core integration?

Yes, the Contentstack.Management.Core package is required as the core dependency, while the ASP.NET Core integration package builds upon it to deliver AddContentstackClient extensions and HttpClientFactory compatibility.

Can I use ContentstackClientOptions to customize Contentstack client registration in dotnet?

Yes, you can pass ContentstackClientOptions to the AddContentstackClient method to customize Contentstack client registration in dotnet, defining specific configurations for your Contentstack Management Client instance.