Locked Web Reference Tool and HTTP Compression

  • Monday, December 07, 2009 3:32 PM
     
     
    I used the Web Reference Tool 2.0 for the following .WSDL file to obtain my codes in VBA. 

    However I should 
    "
    Enable HTTP Compression 
    HTTP Compression had been made mandatory for API’s. Thus API’s client should
    include “Accept-Encoding: zip” header as part of request and should be able to
    handle compressed data. Please note that system will send an error message if client
    are not http compression enabled saying client should be compression enabled.
    "
    Is there a quick and easy way to do this from my VBA Editor?


All Replies

  • Wednesday, April 07, 2010 6:16 PM
     
     Proposed Answer

    Hello,
    Sorry for the late response!
    Does this VB code work for you?

    Dim

     

     

    request

    request =

     

    HttpWebRequest.Create(requestUri)

    request.Headers.Add(

     

    HttpRequestHeader.AcceptEncoding, "gzip")

    request.AutomaticDecompression =

     

    DecompressionMethods.GZip