/DotnetFetch

🌎 Simple .NET implementation of JavaScript fetch API created following the ECMAScript language specification to achieve easy resource fetching

Primary LanguageC#MIT LicenseMIT

DotnetFetch

  • Simple .NET implementation of JavaScript fetch API.
  • Package is on Nuget.
  • Following (partially) the MDN specifications.

Installation

> Install-Package DotnetFetch

Usage

using static DotnetFetch.GlobalFetch;

var result = await Fetch("https://jsonplaceholder.typicode.com/todos/1");

Console.WriteLine(result.Text());
using static DotnetFetch.GlobalFetch;

var result = await Fetch<string>("https://jsonplaceholder.typicode.com/todos/1");

Console.WriteLine(result);