小编use*_*348的帖子

使用xmlhttp的经典ASP页面可以发出JSON请求吗?

我完全迷失了.我试图从使用vbscript的经典asp页面发布到远程服务器上的API.我的代码:

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
xmlhttp.open "POST", vURL, false 
xmlhttp.setRequestHeader "Content-type","application/json"
xmlhttp.setRequestHeader "Accept","application/json"
xmlhttp.send "email=asdf@hotmail.com&firstname=joe&lastname=smith"
vAnswer = xmlhttp.responseText  
Run Code Online (Sandbox Code Playgroud)

我收到的回复是请求不是预期的格式.技术支持告诉我,API期望在帖子正文中使用JSON.我可以从服务器端asp执行此操作吗?

json xmlhttprequest asp-classic

8
推荐指数
2
解决办法
2万
查看次数

标签 统计

asp-classic ×1

json ×1

xmlhttprequest ×1