开发者

How to make Compression Gzip in my xml request using asp code?

开发者 https://www.devze.com 2023-04-10 14:41 出处:网络
I need to implement Compression Gzip in the below xml request <% pXML=Server.URLencode(XML_Request)

I need to implement Compression Gzip in the below xml request

 <%

    pXML=Server.URLencode(XML_Request)    
set http = server.CreateObject("MSXML2.ServerXMLHTTP")    
http.open "post", "http://213.171.234.70/appservices/http/FrontendService", false

    http.setRequestHeader "Content-Type",
 "application/x-www-form-urlencoded"    
http.send  "xml_request=" &pXML

     http_response= http.responsexml.xm开发者_JS百科l
     Set xd= Server.CreateObject("Microsoft.XMLDOM")
     xd.async = "false"
     xd.loadXML(http_response)

 %>

Please help to fix this.....

tks


You can try to add the accept header, so the server will send gzip encoded content.

Add this to your code before http.send:

http.setRequestHeader "Accept-Encoding", "compress, gzip"


I believe you cannot, HTTP protocol doesn't allow it. Please look here for more detailed explanation. Why can't browser send gzip request?

0

精彩评论

暂无评论...
验证码 换一张
取 消