Soenneker.Extensions.HttpContent 4.0.937

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

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Extensions.HttpContent

A collection of helpful HttpContent extension methods.

Installation

dotnet add package Soenneker.Extensions.HttpContent

Quick start

using Soenneker.Extensions.HttpContent;

// Given an existing System.Net.Http.HttpContent? named content:
var result = content.Clone();

Common operations

  • Clone() - Asynchronously copies the content body and headers into a new HttpContent; a null input returns null.
  • AddCookie() - Adds a cookie to the HTTP content's headers.
  • Log() - Reads the content as a string and writes it at debug level; it returns immediately without reading when debug logging is disabled.
  • ShouldUseStream() - Determines whether the specified HTTP content should be processed using a stream based on its content length.
  • GetSmallContentBytes() - Attempts to eagerly materialize the content of an System.Net.Http.HttpContent into a byte array, but only if the payload is small enough (below the internal threshold). This method avoids unnecessary allocations by only materializing a byte array when the content length is definitively small.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Soenneker.Extensions.HttpContent:

Package Downloads
Soenneker.Extensions.HttpResponseMessage

A collection of helpful HttpResponseMessage extension methods

Soenneker.Extensions.HttpRequestMessage

A collection of helpful HttpRequestMessage extension methods

Soenneker.Renovate.Jobs

A utility library for Mend Renovate job related operations

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.948 0 8/30/2026
4.0.947 0 8/30/2026
4.0.946 0 8/30/2026
4.0.944 0 8/30/2026
4.0.943 26 8/30/2026
4.0.941 40 8/30/2026
4.0.940 37 8/30/2026
4.0.938 114 8/30/2026
4.0.937 256 8/29/2026
4.0.935 223 8/29/2026
4.0.934 1,251 8/26/2026
4.0.933 35 8/26/2026
4.0.932 463 8/26/2026
4.0.931 498 8/25/2026
4.0.930 1,665 8/21/2026
4.0.929 2,161 8/18/2026
4.0.928 521 8/18/2026
4.0.927 2,085 8/13/2026
4.0.926 401 8/12/2026
4.0.925 883 8/11/2026
Loading failed

Update dependency Soenneker.Utils.PooledStringBuilders to 4.0.28 (#1288)