odd problem

daytime

Beta member
Messages
3
Location
china
I try to use the serverXMLHTTP to request a https url and get an error at .send(). The error description says "The message received was unexpected or badly formatted".If I run HTTP Analyzer then run my program,I can get the right data.Can someone help me?
code:
TempXmlObject = CreateObject("Msxml2.ServerXMLHTTP.6.0")
With TempXmlObject
.Open("GET", url, False)
.SetRequestHeader("Connection", "keep-alive")
.SetRequestHeader("Accept-Encoding", "gzip, deflate")
.setRequestHeader("Accept-Language", "zh-CN,en-us;q=0.8,en;q=0.6")
.setRequestHeader("User-Agent", agent)
.setOption(2) = 13056
.SetRequestHeader("upgrade-insecure-requests", "1")
.Send()
 
What language? I'm guessing VB.NET?

Can you intercept the request through something like Fiddler and post the full request/response headers that's being done?
 
What language? I'm guessing VB.NET?

Can you intercept the request through something like Fiddler and post the full request/response headers that's being done?
It's written in VB.NET language.I cannot intercept the request through Fiddler.
 
So, what is your end goal I guess? Are you just trying to send an XML document via an http request? If so...why not attach the XML doc to the body of the request, and just issue a PUT or POST to the endpoint?

Or does the endpoint only accept GET requests? If that's the case...then why is it wanting an XML body? Usually that's reserved for PUT and POST, and GET really only checks for route parameters/query string values.
 
I need get the cookies by sending a request then I can interact with the server. I wonder what go wrong but HTTP Analyzer can resolve them automatically.
 
Back
Top Bottom