Com 我如何检索第3&;MSXML2.ServerXMLHTTP'的第四个参数;开放式方法?
我正在使用以下代码:Com 我如何检索第3&;MSXML2.ServerXMLHTTP'的第四个参数;开放式方法?,com,vbscript,httprequest,Com,Vbscript,Httprequest,我正在使用以下代码: 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中发
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和密码(我已经获得了web服务的代码)
PS:我查找的信息不在HttpRequest.Current.Request.Headers中。AFAIK您需要为POST请求设置标题
内容类型: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