MVNet 3.0.0

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

// Install MVNet as a Cake Tool
#tool nuget:?package=MVNet&version=3.0.0

MVNet Nuget

The library has been moved from Leaf.xNet to RuriLib.Http and RuriLib.Proxies.

Maybe the question is, how is it different from the main library?
I must say that I made some changes to make it easier to use and also fixed some minor bugs

Example

using MVNet;

CookieStorage cookies = new CookieStorage();
using (MVNet.HttpClient client = new MVNet.HttpClient())
{
    client.ReadWriteTimeOut = TimeSpan.FromSeconds(10);
    client.ConnectTimeout = TimeSpan.FromSeconds(10);
    client.Proxy = ProxyClient.Parse("http://127.0.0.1:8080");
    using (HttpRequest req = new HttpRequest("https://www.google.com/"))
    {
        req.Cookies = cookies;
        req.AddHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36");
        using (HttpResponse res = await client.SendAsync(req))
        {
            string source = await res.Content.ReadAsStringAsync();
        }
    }
}

How to add header?

using (HttpRequest req = new HttpRequest("https://www.example.com/"))
{
    req.AddHeader("name", "value");
}
using (HttpRequest req = new HttpRequest("https://www.example.com/"))
{
    req.AddCookie("name", "value");
}

How to change proxy?

using (MVNet.HttpClient client = new MVNet.HttpClient())
{
    client.Proxy = ProxyClient.Parse("http://127.0.0.1:8080"); //http
    //or
    client.Proxy = ProxyClient.Parse("socks4://127.0.0.1:1080"); //socks4
    //or
    client.Proxy = ProxyClient.Parse("socks4a://127.0.0.1:1080"); //socks4a
    //or
    client.Proxy = ProxyClient.Parse("socks5://127.0.0.1:1080"); //socks5
    //or
    client.Proxy = ProxyClient.Parse("ap://03000000093132372E302E302E3104393839380431323334"); //azadi
}
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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
3.0.0 197 8/4/2023
2.4.0 147 7/24/2023
2.3.0 166 4/8/2023
2.2.0 299 12/5/2022
2.1.0 319 11/2/2022