locked
DecompressionMethods in Windows.Web.Http RRS feed

  • Question

  • How can I use automatic Compression-Decompression in new Windows.Web.Http request class?

    I want to support Gzip mode of compression-decompression.


    Tuesday, December 10, 2013 9:42 AM

Answers

  • The default for compression is true, so you don't need to specify it yourself.  Since Windows.Web HttpClient uses the same stack that IE uses, you get the same basic set of decompression algorithms.

    Network Developer Experience Team (Microsoft)

    Wednesday, December 11, 2013 9:10 PM

All replies

  • I don't know what Windows.Web.Http has to do with compression.

    You want to check out the Windows.Storage.Compression namespace: http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.compression.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, December 10, 2013 1:29 PM
    Moderator
  • I mean, content encoding application/gzip.

    How do I handle it with new Http API?

    Wednesday, December 11, 2013 3:07 AM
  • new HttpBaseProtocolFilter() { AutomaticDecompression = true };

    Got it. Thanks.

    Wednesday, December 11, 2013 3:36 AM
  • The default for compression is true, so you don't need to specify it yourself.  Since Windows.Web HttpClient uses the same stack that IE uses, you get the same basic set of decompression algorithms.

    Network Developer Experience Team (Microsoft)

    Wednesday, December 11, 2013 9:10 PM