httpclient-factory
Configure Resilient .NET HTTP Clients
Poor HTTP client lifetimes and retry settings can cause connection failures or repeated operations. This skill guides .NET client registration, resilience configuration, request handlers, and testing.
Установить с помощью моего Агента
Скопируйте этот запрос в своего Агента. Он содержит каноническую страницу Skill и манифест.
Review the Skillstore skill "httpclient-factory" from https://skillstore.io/skills/codewithmukesh-httpclient-factory.md and its manifest at https://skillstore.io/api/skills/codewithmukesh-httpclient-factory/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Ваш Агент по-прежнему должен показать план и запросить все подтверждения, требуемые политикой безопасности.
Ресурсы для AI-агентов
Используйте эти ссылки, когда AI-агенту, crawler или script нужен чистый контекст вместо полной страницы.
Протестировать
Использование «httpclient-factory». Which HTTP client registration should a new .NET 10 endpoint use?
Ожидаемый результат:
- Use a named client with keyed registration for direct endpoint injection.
- Set the base address during registration and pass cancellation tokens for requests.
- Configure one resilience pipeline and review retry safety for each operation.
Использование «httpclient-factory». Review a payment client that uses standard resilience and posts charges.
Ожидаемый результат:
- Default retries can repeat a charge after an ambiguous failure.
- Disable unsafe-method retries unless the payment provider supports reliable idempotency keys.
- Test transient failures and verify that one logical payment cannot produce multiple charges.
Использование «httpclient-factory». How can I test a service without calling its external API?
Ожидаемый результат:
- Construct an HttpClient with a custom HttpMessageHandler that returns controlled responses.
- Inject that client into the service under test.
- Check success and failure behavior without opening network connections.
Аудит безопасности
Средний рискAll 44 static findings are false positives: 39 match Markdown backticks, and five match illustrative HTTPS addresses. The payment example enables default retries without disabling unsafe methods, creating a duplicate-charge risk. No evidence found of prompt injection, command execution, or intentional data exfiltration.
Подтверждённые проблемы безопасности (1)
Факторы риска
⚙️ Внешние команды (39)
🌐 Доступ к сети (5)
Поделиться и цитировать этот отчет
Делитесь версионным отчетом об оценке, нейтральным значком, встраиваемой карточкой и цитатами. Skillstore публикует доказательства, не решая, безопасен ли этот Skill.
Копировать ссылку на отчёт
https://skillstore.io/skills/codewithmukesh-httpclient-factory/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportЗначок Markdown
[](https://skillstore.io/skills/codewithmukesh-httpclient-factory?utm_source=security_passport_badge)Значок HTML
<a href="https://skillstore.io/skills/codewithmukesh-httpclient-factory?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/codewithmukesh-httpclient-factory/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Встраиваемая карточка
<iframe src="https://skillstore.io/embed/skills/codewithmukesh-httpclient-factory.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Академические ссылки (APA · BibTeX · CFF)
Цитата APA
codewithmukesh. (2026). httpclient-factory security audit report (audit version 1) [Author version unspecified]. Skillstore. https://skillstore.io/skills/codewithmukesh-httpclient-factory/audits/1Цитата BibTeX
@techreport{codewithmukesh-codewithmukesh-httpclient-factory-2026,
author = {codewithmukesh},
title = {httpclient-factory security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/codewithmukesh-httpclient-factory/audits/1},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "httpclient-factory security audit report (audit version 1)"
version: "unspecified"
type: report
authors:
- name: "codewithmukesh"
date-released: "2026-10-31"
url: "https://skillstore.io/skills/codewithmukesh-httpclient-factory/audits/1"
identifiers:
- type: other
value: "skillstore:codewithmukesh-httpclient-factory:audit:1"
description: "Skillstore immutable audit report identifier"
Оценка Skillstore
Почему такая оценка Достоверность доказательств: СреднийЧто вы можете построить
Integrate an External API
Choose named or keyed clients, configure headers, and add suitable resilience policies for an ASP.NET Core integration.
Review HTTP Reliability
Review connection lifetimes, timeout settings, unsafe retries, shared headers, and handler composition during a service reliability assessment.
Isolate Client Tests
Use an in-memory HttpMessageHandler to test service behavior without contacting an external API.
Попробуйте эти промпты
Show a named IHttpClientFactory client for GitHub repository reads in .NET 10. Include request headers, cancellation, and required packages.
Configure a keyed HTTP client for [API name] in an ASP.NET Core endpoint. Explain its lifetime and propagate cancellation tokens.
Add bearer-token and correlation-ID handlers to [client name]. Use per-request headers and provide isolated tests with a custom HttpMessageHandler.
Review [payment client] for duplicate-charge risks. Assess retries, idempotency, timeouts, lifetimes, and handler stacking. Propose fixes and failure tests.
Лучшие практики
- Use factory-managed clients and select dependency-injection lifetimes that preserve connection management.
- Review retry safety before enabling resilience for payments or other state-changing requests.
- Pass cancellation tokens, set authorization per request, and test clients with controlled handlers.
Избегать
- Creating and disposing a new HttpClient for every production request.
- Retrying non-idempotent operations without explicit safeguards against duplicate effects.
- Stacking standard retry and hedging handlers without a deliberate pipeline design.
Часто задаваемые вопросы
Which .NET version does this skill target?
Does the skill install packages or run tests?
Does it explain named, typed, and keyed clients?
Are default retries safe for payments?
Can the testing example avoid real network requests?
Can I use this guidance with Claude and Codex?
Сведения для разработчиков
Автор
codewithmukeshЛицензия
MIT
Ревизия Skillstore
r1
Примечание о версии
Автор не указал версию.
Ссылка
7f45681b0327e778bad91dabd0ddd268beec2a19
Актуальность поддержки
31.10.2026
Использование
0 загрузок · 0 просмотров
Структура файлов
📄 SKILL.md