set urlname = "https://URL/sso/json/sessions/?_action=validate"
set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.Open "POST", urlname, false
xmlhttp.setRequestHeader "Content-Type", "application/json"
xmlhttp.setRequestHeader "ms-sso", encryptedTicket
xmlhttp.send
set status = xmlhttp.responseText
response.Write("<script language=javascript>console.log(' statuss : " & status & "'); </script>")
我有以上代码块:
我正在尝试使用POST请求调用https URL 它只是基本上解密了令牌(ms-sso)并给出了GUID作为响应。 但我在状态代码和responseText中得到了黑色响应。
但是如果我和Fiddler一起检查它会正常工作:
POST:"https://URL/sso/json/sessions/?_action=validate"
Content-Type: application/json
ms-sso: AQIC5wM2LY4SfcyB2ttvMve81T42_U1gUOWFv4grmOSRssg.*AAJTSQACMDIAAlNLABM0MTQxMTQ5MjM5MzE3OTA5MTA3AAJTMQACMTI.*
{"valid":true,"uid":"8FC1D617-8E32-45E2-9417-0323491765D2","realm":"/msusers"}
为什么会这样?任何想法?