CoreSystem.Http
1.0.4
dotnet add package CoreSystem.Http --version 1.0.4
NuGet\Install-Package CoreSystem.Http -Version 1.0.4
<PackageReference Include="CoreSystem.Http" Version="1.0.4" />
<PackageVersion Include="CoreSystem.Http" Version="1.0.4" />
<PackageReference Include="CoreSystem.Http" />
paket add CoreSystem.Http --version 1.0.4
#r "nuget: CoreSystem.Http, 1.0.4"
#:package CoreSystem.Http@1.0.4
#addin nuget:?package=CoreSystem.Http&version=1.0.4
#tool nuget:?package=CoreSystem.Http&version=1.0.4
🌐 CoreSystem.Http
Build HTTP features once. Reuse them everywhere.
Production-ready HTTP infrastructure for ASP.NET Core and .NET 8.
CoreSystem.Http provides reusable infrastructure for capturing and replaying HTTP responses in ASP.NET Core applications. It offers lightweight, dependency-free components that simplify response interception while promoting code reuse across middleware, pipelines, and application frameworks.
Designed as a foundational building block, CoreSystem.Http can be used by caching, idempotency, auditing, logging, security, or any feature that requires capturing or reproducing HTTP responses.
Why use CoreSystem.Http?
ASP.NET Core provides powerful HTTP primitives, but reusable response capture and replay often require repetitive boilerplate code.
CoreSystem.Http extracts these capabilities into reusable building blocks that can be shared across multiple libraries and applications.
✨ Features
- ✅ Capture responses from the ASP.NET Core pipeline
- ✅ Replay captured responses
- ✅ Response body buffering
- ✅ Header preservation
- ✅ HEAD request support
- ✅ Lightweight and dependency-free
- ✅ Built for ASP.NET Core
- ✅ Reusable across middleware, libraries and application frameworks
📦 Installation
dotnet add package CoreSystem.Http
🚀 Quick Start
Register CoreSystem.Http:
builder.Services.AddCoreHttp();
Inject the required services:
public sealed class MyHandler(
IResponseCapture responseCapture,
IHttpResponseWriter responseWriter)
{
}
Capture an HTTP response:
CapturedResponse response =
await responseCapture.CaptureAsync(
context,
next,
cancellationToken);
Replay the captured response:
await responseWriter.WriteAsync(
context,
response,
cancellationToken);
📖 Public API
CoreSystem.Http intentionally exposes a small, focused and stable public API.
| Type | Kind | Description |
|---|---|---|
IResponseCapture |
Interface | Captures the HTTP response produced by the ASP.NET Core request pipeline. |
IHttpResponseWriter |
Interface | Replays a previously captured response to the current HttpContext. |
CapturedResponse |
Model | Represents a captured HTTP response, including the status code, headers, content type, and response body. |
AddCoreHttp() |
Extension Method | Registers all CoreSystem.Http services required for response capture and replay. |
🏗 Architecture
CoreSystem.Http separates response capture from response replay, allowing both components to be reused independently.
HTTP Request
│
▼
ASP.NET Core Pipeline
│
▼
IResponseCapture
│
▼
CapturedResponse
│
├───────────────┐
│ │
▼ ▼
CoreSystem.Cache CoreSystem.Idempotency
│ │
└───────────────┘
│
▼
IHttpResponseWriter
│
▼
HTTP Response
🎯 Use Cases
CoreSystem.Http serves as reusable infrastructure for features such as:
- HTTP response caching
- Idempotency
- Audit logging
- Response transformation
- API gateways
- Reverse proxies
- Middleware development
- Custom ASP.NET Core frameworks
Dependencies
CoreSystem.Http has no external runtime dependencies beyond ASP.NET Core.
📚 Documentation
The full documentation includes:
- Getting Started
- Architecture
- Dependency Injection
- Response Capture
- Response Replay
- Extensibility
- Best Practices
📚 Documentation
Documentation is continuously expanding as CoreSystem evolves.
Additional guides, architecture notes and examples will be available in the project's documentation site.
🤝 Contributing
Issues, discussions and pull requests are welcome.
📄 License
Released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CoreSystem.Http:
| Package | Downloads |
|---|---|
|
CoreSystem.Idempotency
Production-ready idempotency framework for ASP.NET Core that guarantees exactly-once request processing with Redis and PostgreSQL providers, request fingerprinting, response replay, and native OpenTelemetry support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial stable release.
• HTTP response capture
• HTTP response replay
• Header preservation
• ASP.NET Core integration
• Dependency Injection support
• Production-ready implementation