Czlovek.HttpCommunication
2.1.0-beta.85
See the version list below for details.
dotnet add package Czlovek.HttpCommunication --version 2.1.0-beta.85
NuGet\Install-Package Czlovek.HttpCommunication -Version 2.1.0-beta.85
<PackageReference Include="Czlovek.HttpCommunication" Version="2.1.0-beta.85" />
<PackageVersion Include="Czlovek.HttpCommunication" Version="2.1.0-beta.85" />
<PackageReference Include="Czlovek.HttpCommunication" />
paket add Czlovek.HttpCommunication --version 2.1.0-beta.85
#r "nuget: Czlovek.HttpCommunication, 2.1.0-beta.85"
#:package Czlovek.HttpCommunication@2.1.0-beta.85
#addin nuget:?package=Czlovek.HttpCommunication&version=2.1.0-beta.85&prerelease
#tool nuget:?package=Czlovek.HttpCommunication&version=2.1.0-beta.85&prerelease
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 | net10.0 is compatible. 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. |
-
net10.0
- Czlovek.Randomness (>= 2.1.0-beta.85)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Czlovek.HttpCommunication:
| Package | Downloads |
|---|---|
|
Czlovek.RabbitMq
Provides a RabbitMQ client with connection/channel pooling and configuration-driven topology. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-beta.1 | 0 | 7/19/2026 |
| 2.1.0-beta.85 | 69 | 6/16/2026 |
| 2.1.0-beta.84 | 61 | 5/7/2026 |
| 2.1.0-beta.83 | 58 | 5/7/2026 |
| 2.1.0-beta.82 | 107 | 3/20/2026 |
| 2.1.0-beta.81 | 83 | 2/21/2026 |
| 2.1.0-beta.80 | 76 | 2/21/2026 |
| 2.1.0-beta.79 | 79 | 2/13/2026 |
| 2.1.0-beta.78 | 83 | 2/11/2026 |
| 2.1.0-beta.77 | 77 | 2/11/2026 |
| 2.1.0-beta.76 | 73 | 2/10/2026 |
| 2.1.0-beta.75 | 82 | 2/10/2026 |
| 2.1.0-beta.74 | 85 | 1/28/2026 |
| 2.1.0-beta.73 | 202 | 11/6/2025 |
| 2.1.0-beta.72 | 190 | 11/6/2025 |
| 2.1.0-beta.71 | 195 | 11/4/2025 |
| 2.1.0-beta.70 | 183 | 11/4/2025 |
| 2.1.0-beta.69 | 179 | 11/4/2025 |
| 2.1.0-beta.68 | 194 | 11/4/2025 |
| 1.0.10 | 424 | 4/11/2023 |