SharpFetch 1.0.1-alpha.0.3

This is a prerelease version of SharpFetch.
dotnet add package SharpFetch --version 1.0.1-alpha.0.3
                    
NuGet\Install-Package SharpFetch -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" 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" Version="1.0.1-alpha.0.3" />
                    
Directory.Packages.props
<PackageReference Include="SharpFetch" />
                    
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 --version 1.0.1-alpha.0.3
                    
#r "nuget: SharpFetch, 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@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&version=1.0.1-alpha.0.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SharpFetch&version=1.0.1-alpha.0.3&prerelease
                    
Install as a Cake Tool

🚀 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.

Product 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 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SharpFetch:

Package Downloads
SharpFetch.Global

Adds global access to the Fetch method of SharpFetch

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1-alpha.0.3 27 3/10/2026
0.0.0-alpha.0.15 56 2/21/2026