Coder Social home page Coder Social logo

samkhawase / sharpgis.gzipwebclient Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotmorten/sharpgis.gzipwebclient

0.0 2.0 0.0 140 KB

GZip WebClient for Windows Phone

Home Page: http://www.sharpgis.net/post/2011/08/28/GZIP-Compressed-Web-Requests-in-WP7-Take-2.aspx

C# 100.00%

sharpgis.gzipwebclient's Introduction

###GZip Compression for Windows Phone WebClient

(c) Copyright Morten Nielsen.

This source is subject to the Microsoft Public License (Ms-PL). Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. All other rights reserved.

Available for direct install from NuGet: https://nuget.org/packages/SharpGIS.GZipWebClient

To use this code, explicitly use the SharpGIS.GZipWebClient class where you would normally use a WebClient instance. Ex:

   WebClient client = new SharpGIS.WebClient(); //Yes the type is still WebClient since that's what it inherits from :-)
   //continue with this WebClient as you used to

Or you can automatically opt in for all existing WebClients by adding the following code during application start up:

   WebRequest.RegisterPrefix("http://", SharpGIS.WebRequestCreator.GZip);
   WebRequest.RegisterPrefix("https://", SharpGIS.WebRequestCreator.GZip);

This will change ALL web requests both those that uses WebClient and those that uses the lower-level HttpWebRequest, as well as any 3rd party library to start using compressed requests. Please test thoroughly - I've seen some issues with a few 3rd party libraries that doesn't work well with a different HttpWebRequest object, but for the most part this just works.

Blogpost on this utility available here: http://www.sharpgis.net/post/2011/08/28/GZIP-Compressed-Web-Requests-in-WP7-Take-2.aspx

sharpgis.gzipwebclient's People

Contributors

dotmorten avatar richardszalay avatar

Watchers

Sam Khawase avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.