我正在尝试在经典的asp vbs网站中实现调用todoist.com api的解决方案,有人可以帮助我理解为什么简单的调用返回错误?我试试这个:
我正在尝试这个,但我得到错误返回args是错误的:
function addproject()
strUrl = "https://todoist.com/API/v6/sync/"
strUrl = strUrl &"?token="& sToken &""
strUrl = strUrl &"&commands='[{'type': 'project_add','args': {'name': 'Project1'}}]'"
Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP")
xmlHttp.Open "GET", strUrl, False
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "content-type", "application/x-www-form-urlencoded"
xmlHttp.Send
getHTML = xmlHttp.responseText
Response.write getHTML
set xmlHttp = Nothing
end function