ICompressionSettings Interface
Defines settings that control HTTP request decompression and response compression for the service.
public interface ICompressionSettingsRemarks
Section titled “Remarks”Use TryRead(IConfigurationSection) to create an instance from an Microsoft.Extensions.Configuration.IConfigurationSection or use Defaults for a configuration where both compression and decompression are disabled.
Properties
Section titled “Properties”ICompressionSettings.Defaults Property
Section titled “ICompressionSettings.Defaults Property”Gets the default compression settings with both request decompression and response compression disabled.
static HAKOM.Http.Core.Net.Api.ICompressionSettings Defaults { get; }Property Value
Section titled “Property Value”ICompressionSettings.EnableRequestDecompression Property
Section titled “ICompressionSettings.EnableRequestDecompression Property”Gets a value indicating whether incoming request bodies should be automatically decompressed.
bool EnableRequestDecompression { get; }Property Value
Section titled “Property Value”ICompressionSettings.EnableResponseCompression Property
Section titled “ICompressionSettings.EnableResponseCompression Property”Gets a value indicating whether outgoing response bodies should be automatically compressed.
bool EnableResponseCompression { get; }Property Value
Section titled “Property Value”ICompressionSettings.Key Property
Section titled “ICompressionSettings.Key Property”The configuration key under which compression settings are expected.
static string Key { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ICompressionSettings.TryRead(IConfigurationSection) Method
Section titled “ICompressionSettings.TryRead(IConfigurationSection) Method”Attempts to read compression settings from the specified configuration section.
static HAKOM.ErrorHandling.Core.Net.Api.Result<HAKOM.Http.Core.Net.Api.ICompressionSettings> TryRead(Microsoft.Extensions.Configuration.IConfigurationSection compressionSettings);Parameters
Section titled “Parameters”compressionSettings Microsoft.Extensions.Configuration.IConfigurationSection
The Microsoft.Extensions.Configuration.IConfigurationSection to read from.
Returns
Section titled “Returns”HAKOM.ErrorHandling.Core.Net.Api.Result<ICompressionSettings>
A Result<TValue> containing the parsed ICompressionSettings.