Expert guidance for working with Albatross.Http, a .NET library providing HttpClient extensions and fluent request builders for HTTP client code generation.
Expert guidance for working with the Albatross.Http repository, a .NET library providing HttpClient extensions and fluent request builders for HTTP client code generation.
This repository contains a .NET library (`Albatross.Http`) that extends HttpClient with fluent builders, typed error handling, and logging capabilities.
**Target Framework:** `net8.0`
**Namespace:** `Albatross.Http`
**Solution:** `http.sln`
When the user asks you to build, test, or package the project, use these commands:
```bash
dotnet build http.sln
dotnet build Albatross.Http/Albatross.Http.csproj
dotnet test
dotnet test --filter "FullyQualifiedName~TestCreateUrl.WithNullQueryString_ReturnsUrlOnly"
dotnet pack Albatross.Http/Albatross.Http.csproj
```
Fluent builder for creating `HttpRequestMessage` instances with various content types:
Execute methods that handle HTTP request/response with typed error handling:
URL and query string utilities:
Typed exception class that carries:
`DelegatingHandler` implementation for structured logging of HTTP request/response details via `ILogger`.
MIME type constants for common content types.
The project uses **xUnit** as the testing framework.
**Test Project:** `Albatross.Http.Test`
When running tests, use `dotnet test` or filter by fully qualified name for specific tests.
The repository includes sample projects for internal testing and demonstration:
**IMPORTANT:** Do NOT add documentation (XML doc comments, README files, release notes, etc.) to these sample projects. They are for testing purposes only.
When working with this codebase:
1. **Maintain .NET 8 compatibility** — all code must target `net8.0`
2. **Keep namespace consistent** — all public types belong in `Albatross.Http`
3. **Follow fluent builder patterns** — especially when modifying `RequestBuilder`
4. **Preserve automatic reset behavior** — `RequestBuilder.Build()` must reset state
5. **Use structured logging** — when modifying `LoggingHandler`, maintain structured log format
6. **Test thoroughly** — add xUnit tests for new functionality in `Albatross.Http.Test`
7. **Avoid sample project documentation** — no XML comments, READMEs, or release notes in `Sample.*` projects
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/net-http-client-builder/raw