Czlovek.HttpCommunication 3.0.0-beta.9

This is a prerelease version of Czlovek.HttpCommunication.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Czlovek.HttpCommunication --version 3.0.0-beta.9
                    
NuGet\Install-Package Czlovek.HttpCommunication -Version 3.0.0-beta.9
                    
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="Czlovek.HttpCommunication" Version="3.0.0-beta.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Czlovek.HttpCommunication" Version="3.0.0-beta.9" />
                    
Directory.Packages.props
<PackageReference Include="Czlovek.HttpCommunication" />
                    
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 Czlovek.HttpCommunication --version 3.0.0-beta.9
                    
#r "nuget: Czlovek.HttpCommunication, 3.0.0-beta.9"
                    
#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 Czlovek.HttpCommunication@3.0.0-beta.9
                    
#: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=Czlovek.HttpCommunication&version=3.0.0-beta.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Czlovek.HttpCommunication&version=3.0.0-beta.9&prerelease
                    
Install as a Cake Tool

HTTP Communication

Correlation-ID handling for ASP.NET Core, random user agents and a safe file download helper.

Correlation ID

builder.Services.AddCorrelationId();
app.UseCorrelationId();                       // early in the pipeline

Every request gets a CorrelationId header: an incoming valid GUID is kept, otherwise a new one is generated. The ID is visible downstream, echoed in the response and added to the logging scope. /health and /alive are skipped.

Guid? id = httpContext.GetCorrelationId();
Guid? id = httpContextAccessor.GetCorrelationId();

User agents

var any = Utils.RandomUserAgent;
var desktop = Utils.RandomDesktopUserAgent;
var mobile = Utils.RandomMobileUserAgent;

Download

bool ok = await Utils.DownloadAsync(httpClient, new Uri("https://example.com/data.zip"), "data.zip", logger, ct);

The body is streamed to disk. A non-success status code returns false and leaves an existing file untouched; a partially written file is deleted.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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 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
Loading failed