Yoshiboi18303.Http 1.0.1

dotnet add package Yoshiboi18303.Http --version 1.0.1
NuGet\Install-Package Yoshiboi18303.Http -Version 1.0.1
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="Yoshiboi18303.Http" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Yoshiboi18303.Http --version 1.0.1
#r "nuget: Yoshiboi18303.Http, 1.0.1"
#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.
// Install Yoshiboi18303.Http as a Cake Addin
#addin nuget:?package=Yoshiboi18303.Http&version=1.0.1

// Install Yoshiboi18303.Http as a Cake Tool
#tool nuget:?package=Yoshiboi18303.Http&version=1.0.1

Yoshiboi18303.Http

A great C# package for working with the HttpClient class easier.

Compatibility

This package only supports .NET 7 at the moment, sorry to all the .NET 6 users.

Installation

Installation is easy, just run one command!

Package Manager Console (Visual Studio)

Install-Package Yoshiboi18303.Http

.NET CLI

dotnet add package Yoshiboi18303.Http

Usage

This package contains one singular static class, which has all the HTTP methods.

Getting Content

using System;
using Yoshiboi18303.Http;

namespace SomeProgram
{
    class Program
    {
        public static async Task Main() => new Program().MakeRequest();

        public async Task MakeRequest()
        {
            var myModel = await HttpUtils.FetchToModelAsync<SomeModel>("https://example.com");
            Console.WriteLine(myModel);
        }
    }
}

Posting to a server

using System;
using System.Net.Http;
using Yoshiboi18303.Http;

namespace SomeProgram
{
    class Program
    {
        public static async Task Main() => new Program().MakeRequest();

        public async Task MakeRequest()
        {
            var content = new StringContent(s"{\"someKey\": \"someValue\"}")
            var myModel = await HttpUtils.PostAsync("https://example.com", myContent);
            Console.WriteLine(myModel);
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in 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 150 8/22/2023

Initial Release