Chase.Networking 0.0.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package Chase.Networking --version 0.0.5                
NuGet\Install-Package Chase.Networking -Version 0.0.5                
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="Chase.Networking" Version="0.0.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chase.Networking --version 0.0.5                
#r "nuget: Chase.Networking, 0.0.5"                
#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 Chase.Networking as a Cake Addin
#addin nuget:?package=Chase.Networking&version=0.0.5

// Install Chase.Networking as a Cake Tool
#tool nuget:?package=Chase.Networking&version=0.0.5                


a simple networking library

Create Client

using Chase.Networking;
// ...
using NetworkClient client = new NetworkClient();

Download File

client.DownloadFileAsync("", "/path/to/");

Getting additional download information

Additional information that can be received is as follows:

  • Bytes Downloaded - The total amount of bytes that have been downloaded,
  • Bytes Per Second - The speed of the download in bps,
  • Bytes Remaining - The number of bytes that are left to be downloaded,
  • Percentage - The percent of the file that has been downloaded, value is a float between 0 and 1,
  • Total Bytes To Receive - The total size of the downloading file,
DownloadProgressEvent progressEvent = (s, e) =>
    Console.WriteLine($"Download Progress {e.Percentage:P2}%");
    Console.WriteLine($"Download Speed {e.BytesPerSecond}bps");
    Console.WriteLine($"Downloaded {e.BytesDownloaded}bytes / {e.TotalBytesToReceive}bytes");
    Console.WriteLine($"Remaining {e.BytesRemaining}bytes");

client.DownloadFileAsync("", "/path/to/", progressEvent);

Get Request as Newtonsoft.JSON

A normal get request

JObject? jObject = await client.GetAsJson("");
JArray? jArray = await client.GetAsJsonArray("");

or you can also pass a HttpRequestMessage for more advanced requests

using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "");
JObject? jObject = await client.GetAsJson(request);
JArray? jArray = await client.GetAsJsonArray(request);
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
0.0.7 148 9/14/2023
0.0.6 101 9/13/2023
0.0.5 104 9/13/2023
0.0.4 119 9/12/2023
0.0.3 130 7/27/2023
0.0.2 133 7/27/2023
0.0.1 147 7/23/2023

Added FileName property to DownloadProgressEventArgs