This project is read-only.

HttpClient and Compression

Topics: Web Api
Nov 23, 2010 at 4:17 PM

If I enable compression in IIS, does the HttpClient support this?


Nov 23, 2010 at 5:50 PM
It should as we build on HttpWebRequest which supports compression. Haven't tested though.

On Nov 23, 2010, at 8:18 AM, "mpapas" <> wrote:

From: mpapas

If I enable compression in IIS, does the HttpClient support this?

Read the full discussion online.

To add a post to this discussion, reply to this email (

To start a new discussion for this project, email

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at

Nov 24, 2010 at 5:24 PM

Nice.  This seems to do the trick:

var client = new HttpClient();

client.TransportSettings.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
Nov 24, 2010 at 5:27 PM

Oh I should mention that using Fiddler, I noticed that compression seems to work only on responses to GET.  Any content included as the response to a POST doesn't get compressed.

However, I'm not sure if this is an HTTP thing, IIS configuration thing, or an HttpClient thing :-)