SharpFetch.Global 1.0.1-alpha.0.3

This is a prerelease version of SharpFetch.Global.
dotnet add package SharpFetch.Global --version 1.0.1-alpha.0.3
                    
NuGet\Install-Package SharpFetch.Global -Version 1.0.1-alpha.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SharpFetch.Global" Version="1.0.1-alpha.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpFetch.Global" Version="1.0.1-alpha.0.3" />
                    
Directory.Packages.props
<PackageReference Include="SharpFetch.Global" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpFetch.Global --version 1.0.1-alpha.0.3
                    
#r "nuget: SharpFetch.Global, 1.0.1-alpha.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SharpFetch.Global@1.0.1-alpha.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpFetch.Global&version=1.0.1-alpha.0.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SharpFetch.Global&version=1.0.1-alpha.0.3&prerelease
                    
Install as a Cake Tool

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

NuGet Version License: MIT Build Status

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.Global to call Fetch() 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.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

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