NetWave 1.0.0
dotnet add package NetWave --version 1.0.0
NuGet\Install-Package NetWave -Version 1.0.0
<PackageReference Include="NetWave" Version="1.0.0" />
<PackageVersion Include="NetWave" Version="1.0.0" />
<PackageReference Include="NetWave" />
paket add NetWave --version 1.0.0
#r "nuget: NetWave, 1.0.0"
#:package NetWave@1.0.0
#addin nuget:?package=NetWave&version=1.0.0
#tool nuget:?package=NetWave&version=1.0.0
NetWave
NetWave is a lightweight and powerful HTTP client library designed specifically for .NET 8 applications. It simplifies making HTTP requests and provides seamless integration with RESTful APIs. With NetWave, developers can perform GET and POST requests easily while benefiting from enhanced error handling, detailed logs, and user-friendly exceptions.
Features
- Ease of Use: Intuitive and developer-friendly APIs, abstracting away the complexity of HTTP requests.
- Compatibility: Optimized for .NET 8, leveraging the latest features and enhancements.
- Performance: Built on top of
HttpClient, ensuring high performance and low memory overhead. - Detailed Logs: Comprehensive logging for each request and response, making debugging easier.
- Flexible Serialization: Out-of-the-box support for JSON serialization/deserialization using
System.Text.Json. - Error Handling: Meaningful exceptions with detailed messages to quickly identify issues.
Installation
Install the package via NuGet:
dotnet add package NetWave
Usage
1- Perform GET Requests <br /> Fetch data from an API endpoint:
using NetWave;
var url = "https://jsonplaceholder.typicode.com/posts";
var result = await NetWave.GetAsync<dynamic[]>(url);
Console.WriteLine("GET Request Result:");
foreach (var item in result)
{
Console.WriteLine($"ID: {item.id}, Title: {item.title}");
}
2- Perform POST Requests <br/> Send data to an API endpoint:
using NetWave;
var postUrl = "https://jsonplaceholder.typicode.com/posts";
var body = new { title = "foo", body = "bar", userId = 1 };
var postResult = await NetWave.PostAsync<dynamic, dynamic>(postUrl, body);
Console.WriteLine("POST Request Result:");
Console.WriteLine($"Created ID: {postResult.id}");
3- Handle Errors Gracefully <br/> NetWave automatically logs errors, but you can handle them explicitly if needed:
using NetWave;
try
{
var url = "https://invalid.api.endpoint";
var result = await NetWave.GetAsync<dynamic>(url);
Console.WriteLine(result ?? "Request failed.");
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
Why Choose NetWave?
- Developer-Centric: Simplifies HTTP interactions, letting you focus on your application's logic.
- Modern Features: Built to harness the power of .NET 8.
- Reliable: Tested to ensure stability across various use cases.
License
This project is licensed under the MIT License.
Contact
For support or feedback, feel free to reach out via the GitHub Issues page. https://github.com/MustafaLotfyGhoneim/NetWave/issues
| Product | Versions 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 was computed. 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 was computed. 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. |
| .NET Framework | net481 is compatible. |
-
.NETFramework 4.8.1
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 8.0.0)
-
net8.0
- System.Net.Http (>= 4.3.4)
- System.Text.Json (>= 8.0.0)
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.0 | 195 | 12/31/2024 |