gzip

.net

Net.WebClient and Deflate

In a previous entry, Net.WebClient and Gzip, I posted a code snippet that enables the missing HTTP compression in Net.WebClient, using the always handy SharpZipLib. This code eventually made it into one of my CodeProject articles. An eagle-eyed CodeProject reader noted that, while my code worked for gzip

By Jeff Atwood ·
Comments

c#

Net.WebClient and GZip

The Net.WebClient class doesn’t support HTTP compression, e.g., when you add the Accept-Encoding: gzip,deflate header to your request: Dim wc As New Net.WebClient '-- google will not gzip the content if the User-Agent header is missing! wc.Headers.Add("User-Agent", strHttpUserAgent) wc.

By Jeff Atwood ·
Comments