我使用以下代码:
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.Open "POST", URL + "/" + Method, false,UID,PASSWORD
objXMLHTTP.Send ' Not sending custom parameters
WScript.Sleep 500
Loop
MsgBox objXMLHTTP.responseTEXT
有没有办法检索URL内发送的UID和PASSWORD(我已经获得了Web服务的代码)?
PS:我寻求的信息不在HttpRequest.Current.Request.Headers中。
答案 0 :(得分:1)
AFAIK您需要为POST请求设置标头Content-Type: application/x-www-form-urlencoded
,因此请尝试将代码更改为:
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.Open "POST", URL + "/" + Method, False, UID, PASSWORD
objXMLHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXMLHTTP.Send