SharpFetch.Global
1.0.1-alpha.0.3
dotnet add package SharpFetch.Global --version 1.0.1-alpha.0.3
NuGet\Install-Package SharpFetch.Global -Version 1.0.1-alpha.0.3
<PackageReference Include="SharpFetch.Global" Version="1.0.1-alpha.0.3" />
<PackageVersion Include="SharpFetch.Global" Version="1.0.1-alpha.0.3" />
<PackageReference Include="SharpFetch.Global" />
paket add SharpFetch.Global --version 1.0.1-alpha.0.3
#r "nuget: SharpFetch.Global, 1.0.1-alpha.0.3"
#:package SharpFetch.Global@1.0.1-alpha.0.3
#addin nuget:?package=SharpFetch.Global&version=1.0.1-alpha.0.3&prerelease
#tool nuget:?package=SharpFetch.Global&version=1.0.1-alpha.0.3&prerelease
SharpFetch.Global
Adds access to the Fetch method to your project globally! Never worry about usings, instanciation, or anything else again. Just call Fetch() anywhere in your code and it will work.
🚀 SharpFetch
The simplicity of the JS Fetch API meets the power of .NET.
SharpFetch is a lightweight, high-performance wrapper around HttpClient that brings the intuitive syntax of JavaScript's Fetch API to C#. It eliminates boilerplate while adding C# essentials like strict type safety, dependency injection support, and modern async patterns.
⚡ The Comparison
Stop fighting with HttpClient boilerplate. SharpFetch makes network requests feel natural.
JavaScript (Native)
const data = await fetch("https://api.example.com/user")
.then(res => res.json());
C# with SharpFetch
var data = await Fetch("https://api.example.com/user")
.Then(res => res.Json());
✨ Key Features
1:1 Syntax: If you know Fetch, you already know SharpFetch.
Type Safety: Seamlessly parse JSON into C# Classes/Records.
Global Opt-in: Use
SharpFetch.Globalto callFetch()anywhere without extra namespaces.Modern .NET: Fully compatible with .NET 8, 9, and 10.
Zero Bloat: Minimal dependencies to keep your project lean.
🚀 Quick Start
1. Installation
dotnet add package SharpFetch
Optionally also add SharpFetch.Global for an automatic global static using.
2. Basic Usage (Fluent)
// Simple string-based fetch
var user = await Fetch("https://api.example.com/profile")
.Then(res => res.Json<UserProfile>());
3. Professional Usage (Instantiated)
For enterprise apps, use the instantiated version for better control over the lifecycle:
var api = new SharpFetch();
var response = await api.Fetch("https://api.example.com/data", new Options {
Method = Method.Post,
Body = new { name = "John Doe" }
});
var result = await response.Json<ExampleClass>();
🛠 Project Status
SharpFetch is currently in active development.
Core Fetch implementation
JSON Deserialization
🤝 Contributing
Contributions are welcome! Whether it's a bug report or a feature request, feel free to open an issue.
Built with ❤️ for the .NET community.
🤖 AI Disclaimer
SharpFetch was supported in development by AI. Key involvements include:
- Code Reviews
- Architectural Improvement Recommendations
- Assisting in simple programming tasks
- Test-writing
- Documentation
Any contributions by AI are humanly reviewed. We urge all contributors to properly review their AI-generated code before submitting it.
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SharpFetch (>= 1.0.1-alpha.0.3)
-
net8.0
- SharpFetch (>= 1.0.1-alpha.0.3)
-
net9.0
- SharpFetch (>= 1.0.1-alpha.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1-alpha.0.3 | 30 | 3/10/2026 |