Asp classic 来自经典ASP.NET的Pingdom REST API

Asp classic 来自经典ASP.NET的Pingdom REST API,asp-classic,pingdom,Asp Classic,Pingdom,我想使用经典ASP中的Pingdom REST API,但代码如下:- ' setup the URL baseUrl = "https://api.pingdom.com/api/2.0/checks" ' setup the request and authorization Set http = Server.CreateObject("MSXML2.ServerXMLHTTP") http.open "GET", baseUrl, False http.setRequestHeade

我想使用经典ASP中的Pingdom REST API,但代码如下:-

' setup the URL
baseUrl = "https://api.pingdom.com/api/2.0/checks"

' setup the request and authorization
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.open "GET", baseUrl, False 
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.setRequestHeader "userpwd", "aaaaaaaaaaaaaaaaaaaaaaa:bbbbbbbbbbb"
http.setRequestHeader "App-Key", "ccccccccccccccccccccccccccccccc"

' send the HTTP data
http.send 
给我一个错误:-

{"error":{"statuscode":401,"statusdesc":"Unauthorized","errormessage":"User credentials missing"}}
因此,我的身份验证没有正确地传递,看起来不应该在requestheader中传递身份验证,但我不确定应该如何传递身份验证

谢谢

感谢Alex K。为了其他人的利益,正确的语法是:-

' setup the URL
baseUrl = "https://api.pingdom.com/api/2.0/checks"

Response.Write fullUrl
' setup the request and authorization
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.open "GET", baseUrl, False, "emailaddress", "password"
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.setRequestHeader "App-Key", "keykeykeykeykeykeykeykeykeykey"

' send the HTTP data
http.send 
:-)

正在使用基本身份验证,因此您需要在通话中传递凭据