Skip to content

Clarify "Applies to" section for System.Net.DecompressionMethods #11362

Closed
@BashMat

Description

@BashMat

Type of issue

Other (describe below)

Description

Currently I'm working on adding request-response compression and decompression between client app (.NET Framework) and Web API app (.NET). Brotli algorithm was expected to be used, but upon implementing I noticed that .NET Framework does not support this option in System.Net.DecompressionMethods enum, therefore I cannot set it for System.Net.HttpWebRequest.AutomaticDecompression property:

namespace System.Net
{
  /// <summary>Represents the file compression and decompression encoding format to be used to compress the data received in response to an <see cref="T:System.Net.HttpWebRequest" />.</summary>
  [Flags]
  [__DynamicallyInvokable]
  public enum DecompressionMethods
  {
    /// <summary>Do not use compression.</summary>
    [__DynamicallyInvokable] None = 0,
    /// <summary>Use the gZip compression-decompression algorithm.</summary>
    [__DynamicallyInvokable] GZip = 1,
    /// <summary>Use the deflate compression-decompression algorithm.</summary>
    [__DynamicallyInvokable] Deflate = 2,
  }
}

Looking for solution, I found out that specified documentation page mentions .NET Framework in its Applies to section, which confused me. I found dotnet/runtime#24986 for .NET Core and checked page for .NET Framework version, which confirmed for me that new enum members were not supported for .NET Framework.

I am not entirely familiar with docs style, so my question is: should this section be changed for all page versions? I would expect that page version for .NET Framework would not mention .NET and vice versa due to different enum members.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.net.decompressionmethods?view=net-9.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net/DecompressionMethods.xml

Document Version Independent Id

34ea9652-3be3-1cd0-5f35-3f335b697cb7

Platform Id

9b829304-22b5-9a74-ff12-547bbe83889d

Article author

@karelz

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions