title: How to compress web service response json in ajax call
body: <p>I am using asmx web service and calling it through ajax as</p>
  
  <pre>
  
          $.ajax({
          url: 'xxxxxxx.asmx/Getxxxxxxxx',
          method: 'post',
          contentType: 'application/json; charset=utf-8',
          dataType: 'json',
          success: function (data) {
              $(data.d).each(function (index, category) {
  
  </pre>
  
  <p>My service returns a list of objects. I was reading on how to compress the response of a web service and it seems to me that to do this I need to override the GetWebRequest method and use Gzip/Deflate (in a class derived from web service proxy class).</p>
  
  <p>The next step would be to use an instance of this class (which overrides GetWebRequest) and use this in application.</p>
  
  <p>Since, I am using ajax call, I am not sure how to use this instance of class which overrides GetWebRequest method.</p>
  
  <p>Thank you.</p>