dotnet-configuration-resilience

Configure retries, timeouts, pagination, SSE streaming, and logging for APIMatic-generated .NET SDK clients.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/apimatic/plugin-marketplace --skill dotnet-configuration-resilience-apimatic
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotnet-configuration-resilience
Source: https://github.com/apimatic/plugin-marketplace/tree/main/plugins/maxio-sdk/skills/dotnet-configuration-resilience
Command: npx skills add https://github.com/apimatic/plugin-marketplace --skill dotnet-configuration-resilience-apimatic

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? APIMatic-generated .NET SDKs expose configuration options whose names do not reveal their real behavior: which calls actually retry, what a timeout truly bounds, and which settings you must set yourself. This Skill prevents misconfigured clients that hang for minutes, silently duplicate non-idempotent writes, or ignore server overrides. ## Core Features & Use Cases - Retry & Timeout Tuning: Explains RetryOptions defaults (Polly-based), per-attempt vs. whole-call timeout layers, and how to bound calls with CancellationToken at an integration boundary. - Safe Writes Under Transport Retries: Details why transport failures retry on every HTTP verb and gives four remedies, including a DelegatingHandler that blocks unauthorized re-sends. - Pagination, SSE Streaming & Logging: Covers auto-paginating IAsyncEnumerable operations, server-sent event streams with idle timeouts and SseException handling, and request/response logging via a custom DelegatingHandler. - Use Case: Before registering an APIMatic .NET SDK client in an ASP.NET Core app, use this Skill to set a 10s per-attempt timeout, a 30s call budget via linked CancellationToken, and a logging handler to verify the first request on the wire. ## Quick Start Ask the agent to configure the APIMatic .NET SDK client with explicit retry, timeout, and cancellation settings before registering it in your application.

Frequently Asked Questions about dotnet-configuration-resilience

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

FAQPage Schema
How do I configure retries in an APIMatic .NET SDK?▼

Set options.Retry using RetryOptions.Default() with a C# with-expression to override MaxRetries, Timeout, Delay, BackOffFactor, and OnRetry. Defaults retry status codes 408, 429, and 5xx on idempotent verbs up to 3 times with exponential backoff.

How do I set a timeout for an entire API call in C#?▼

Pass a CancellationToken from a CancellationTokenSource with CancelAfter to the SDK call, since both RetryOptions.Timeout and HttpClient.Timeout are per-attempt only. A linked token at your integration boundary caps the whole call including retries.

Does the APIMatic .NET SDK retry failed POST requests?▼

Status-code retries exclude POST, but transport failures (HttpRequestException) retry on every verb up to MaxRetries. A non-idempotent write can execute more than once, so use idempotency keys or a DelegatingHandler that blocks unauthorized re-sends.

How do I add logging to an APIMatic .NET SDK client?▼

There is no built-in logging hook; attach a custom DelegatingHandler to the HttpClient passed to the client. With DI, register the handler on the default IHttpClientFactory client or use a named client to scope it to this SDK.

Why does changing options.Environment after client construction not work?▼

The client captures options.Environment once at construction but re-resolves ServerOptions on every request. Assigning Environment afterward silently does nothing; construct a new client to change environments.

How do I consume paginated endpoints in the .NET SDK?▼

Paginated operations return IAsyncEnumerable<IReadOnlyList<Item>> and auto-advance paging state. Seed the first page with paging arguments, then await foreach the pages, nesting a loop to process individual items.