Czlovek.HttpCommunication
1.0.10
See the version list below for details.
dotnet add package Czlovek.HttpCommunication --version 1.0.10
NuGet\Install-Package Czlovek.HttpCommunication -Version 1.0.10
<PackageReference Include="Czlovek.HttpCommunication" Version="1.0.10" />
<PackageVersion Include="Czlovek.HttpCommunication" Version="1.0.10" />
<PackageReference Include="Czlovek.HttpCommunication" />
paket add Czlovek.HttpCommunication --version 1.0.10
#r "nuget: Czlovek.HttpCommunication, 1.0.10"
#:package Czlovek.HttpCommunication@1.0.10
#addin nuget:?package=Czlovek.HttpCommunication&version=1.0.10
#tool nuget:?package=Czlovek.HttpCommunication&version=1.0.10
User Agent and Download Utils
This code provides utility functions related to user agent strings and downloading files using HttpClient.
Usage
Generating a random user agent string
To generate a random user agent string, call the RandomUserAgent method:
string randomUserAgent = Utils.RandomUserAgent;
Generating a random desktop or mobile user agent string
To generate a random user agent string specific to desktop or mobile, call RandomDesktopUserAgent or RandomMobileUserAgent, respectively:
string randomDesktopUserAgent = Utils.RandomDesktopUserAgent; string randomMobileUserAgent = Utils.RandomMobileUserAgent;
Generating a random operating system user agent string
To generate a random operating system user agent string, call RandomOsUserAgent:
string randomOsUserAgent = Utils.RandomOsUserAgent;
Downloading a file with HttpClient
To download a file using HttpClient and save it to disk with the given file name, call the Download method. This method returns a Task<bool> representing the completion of the download, with true indicating success and false indicating failure. An optional ILogger instance can be provided to log download progress and errors.
HttpClient httpClient = new HttpClient();
Uri uri = new Uri("http://example.com/file.txt");
string fileName = "file.txt";
ILogger logger = null;
bool success = await Utils.Download(httpClient, uri, fileName, logger);
| Product | Versions 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. 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. |
-
net7.0
- Czlovek.Randomness (>= 1.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Czlovek.HttpCommunication:
| Package | Downloads |
|---|---|
|
Czlovek.RabbitMq
RabbitMQ client with connection/channel pooling, consumers and configuration-driven topology. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-beta.10 | 50 | 11/22/2026 |
| 3.0.0-beta.9 | 51 | 11/22/2026 |
| 3.0.0-beta.8 | 59 | 11/21/2026 |
| 3.0.0-beta.6 | 86 | 9/29/2026 |
| 3.0.0-beta.5 | 89 | 9/27/2026 |
| 3.0.0-beta.4 | 66 | 9/27/2026 |
| 3.0.0-beta.3 | 67 | 9/27/2026 |
| 3.0.0-beta.2 | 72 | 9/27/2026 |
| 3.0.0-beta.1 | 94 | 7/19/2026 |
| 2.1.0-beta.85 | 95 | 6/16/2026 |
| 2.1.0-beta.84 | 83 | 5/7/2026 |
| 2.1.0-beta.83 | 81 | 5/7/2026 |
| 2.1.0-beta.82 | 131 | 3/20/2026 |
| 2.1.0-beta.81 | 104 | 2/21/2026 |
| 2.1.0-beta.80 | 97 | 2/21/2026 |
| 2.1.0-beta.79 | 98 | 2/13/2026 |
| 2.1.0-beta.78 | 106 | 2/11/2026 |
| 2.1.0-beta.77 | 95 | 2/11/2026 |
| 2.1.0-beta.76 | 90 | 2/10/2026 |
| 1.0.10 | 464 | 4/11/2023 |