Επεξεργασία

Κοινή χρήση μέσω


SocketsHttpHandler.AutomaticDecompression Property

Definition

Gets or sets the type of decompression method used by the handler for automatic decompression of the HTTP content response.

public:
 property System::Net::DecompressionMethods AutomaticDecompression { System::Net::DecompressionMethods get(); void set(System::Net::DecompressionMethods value); };
public System.Net.DecompressionMethods AutomaticDecompression { get; set; }
member this.AutomaticDecompression : System.Net.DecompressionMethods with get, set
Public Property AutomaticDecompression As DecompressionMethods

Property Value

The type of decompression method used by the handler for automatic decompression of the HTTP content response.

Remarks

Automatic decompression works only on the top most compression. So if the content is compressed multiple times, only the last compression will be decompressed. For example, for a response with Content-Encoding: gzip, br header that contains content first compressed with gzip and then with Brotli, the content will only be decompressed using Brotli, leaving the still gzipped content in the Content.

Setting automatic decompression to anything other than None will result in adding Accept-Encoding header with the set values into every outgoing HttpRequestMessage.

Applies to