I'm using Msxml2.ServerXMLHTTP.6.0 to POST/GET data from Twitters API. Everything is working fine apart from one API function.
I need to see what I'm sending to api.twitter.com so I can fix it.
The script was written by someone else and is very long and complicated, but this is the send function which fires the request off to twitter:
Dim objXMLHTTP : Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")
objXMLHTTP.setTimeouts OAUTH_TIMEOUT_RESOLVE, OAUTH_TIMEOUT_CONNECT, OAUTH_TIMEOUT_SEND, OAUTH_TIMEOUT_RECEIVE
objXMLHTTP.Open m_strRequestMethod, strRequestURL, False
objXMLHTTP.SetRequestHeader "Content-Type","application/x-www-form-urlencoded"
objXMLHTTP.SetRequestHeader "User-Agent", m_strUserAgent
objXMLHTTP.SetRequestHeader "Host", m_strHost
objXMLHTTP.Send()
Set objXMLHTTP = Nothing
Is there anyway I can see what is being sent in its RAW format?
Thanks
To my eye it looks like it's sending very little. To dissect the code:
Declare and set the object.
Set the timeouts to a bunch of constants.
Open a URL (whatever
strRequestURL
equals), likely as either as a GET or POST (whateverm_strRequestMethod
equals).Set three common request headers. The first is the normal way
POST
data is sent (basically, as a giant querystring), the other two specify information about the sender.Send the request.
Destroy the object.
Sorry I can't be more helpful, but if that is all the code (and the fact that it goes from object creation to destruction implies so) I really can't see that it is sending much data aside from what is potentially in the URL itself.
strRequestURL
,m_strUserAgent
andm_strHost
is really the only custom data being sent - looking at their values should tell you everything unique about the requests.