Fetch_dotNET 2.0.0

dotnet add package Fetch_dotNET --version 2.0.0
                    
NuGet\Install-Package Fetch_dotNET -Version 2.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="Fetch_dotNET" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fetch_dotNET" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Fetch_dotNET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fetch_dotNET --version 2.0.0
                    
#r "nuget: Fetch_dotNET, 2.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.
#:package Fetch_dotNET@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fetch_dotNET&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Fetch_dotNET&version=2.0.0
                    
Install as a Cake Tool

Fetch_dotNET (.NET Framework)

Fetch_dotNET è una libreria di utility HTTP per .NET Framework che fornisce un wrapper ad alto livello per effettuare richieste HTTP, download di file e operazioni di rete comuni.

La libreria è pensata per applicazioni .NET Framework (4.x) e utilizza le API classiche (WebClient, HttpWebRequest) mantenendo un’API semplice e immediata.


Requisiti

  • .NET Framework 4.0 o superiore
  • Connessione Internet disponibile

Installazione

Package Manager

Install-Package Fetch_dotNET

Funzionalità principali

  • Verifica connessione Internet
  • Recupero IP locale e pubblico
  • Recupero MAC Address
  • Ping host
  • Richieste HTTP:
    • GET
    • POST
    • UPDATE
    • DELETE
  • Supporto:
    • Timeout
    • Basic Authentication
    • Bearer JWT
    • Header personalizzati
  • Upload dati:
    • stringhe (JSON)
    • NameValueCollection
  • Download file
  • API sincrone e asincrone

Quick Start

using System;
using System.Threading.Tasks;
using Fetch_dotNET;

class Program
{
    static async Task Main(string[] args)
    {
        Console.WriteLine("Using Fetch");

        bool isConnected = HttpClient.IsConnectedToInternet();
        if (!isConnected) return;

        var response = HttpClient.Fetch("http://localhost/api/Azienda?lic_id=5383");
        Console.WriteLine(response);

        var asyncResponse = await HttpClient.FetchAsync("http://localhost/api/Azienda?lic_id=5383");
        Console.WriteLine(asyncResponse);
    }
}

Esempi di utilizzo

GET

var response = HttpClient.Fetch("http://localhost/api/Azienda?lic_id=5383");

GET con timeout

var response = HttpClient.Fetch("http://localhost/api/Azienda?lic_id=5383", 3000);

POST JSON

string address = "http://localhost/api/Appuntamenti";
string json = "{'shop_id':8000,'read':'secondary'}";

var response = HttpClient.Fetch(address, "POST", json);

POST con NameValueCollection

using System.Collections.Specialized;

var values = new NameValueCollection();
values["product"] = "Fetch_dotNET";
values["version"] = "1.0.0";

var response = HttpClient.Fetch("http://localhost/api/addLog.php", values);

Download file

string fileUrl  = "http://localhost/books/Extjs-Release1.0.0.pdf";
string filePath = @"C:\path\to\file.pdf";

var response = HttpClient.FetchDownloadFile(fileUrl, filePath);

Note

  • Questo pacchetto è specifico per .NET Framework
  • Per .NET moderno (net8 / net10) è disponibile un pacchetto separato

Licenza

Consulta la pagina NuGet del pacchetto per i dettagli sulla licenza.

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Fetch_dotNET:

Package Downloads
PushNotification_dotNET

PushNotification is a framework for Notification .NET applications. Handle Push Notifications. Across iOS, Android and UWP from a single API.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 90 1/17/2026
1.3.0 293 12/5/2024
1.2.9 1,274 11/3/2022
1.2.8 613 6/22/2022
1.2.7 678 11/5/2021
1.2.6 563 10/27/2021
1.2.5 785 7/25/2021
1.2.4 567 6/9/2021
1.2.3 558 3/22/2021
1.2.2 668 12/13/2020
1.2.1 704 10/24/2020
1.2.0 704 10/11/2020
1.1.1 654 8/12/2020
1.1.0 655 8/6/2020
1.0.9 754 8/6/2020
1.0.8 623 8/5/2020
1.0.7 620 8/4/2020
1.0.6 635 8/4/2020
1.0.5 694 8/3/2020
1.0.4 739 7/28/2020
1.0.3 672 7/28/2020
1.0.2 693 7/19/2020
1.0.1 664 7/19/2020
1.0.0 637 7/18/2020

Extensions on the Fetch .NetFramework.