为什么我得到-加载资源失败:飞行前响应不成功?

时间:2019-05-28 11:40:43

标签: asp-classic

我在.asp页的请求中发送了有效的JSON字符串,但出现此错误。

[Error] Failed to load resource: Preflight response is not successful (checkout, line 0)
[Error] XMLHttpRequest cannot load https://test.checkout.dibspayment.eu/api/v1/theming/checkout. Preflight response is not successful

我正在用它发送它。

Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
    objXmlHttp.Open "POST", url, False
    objXmlHttp.SetRequestHeader "Content-Type", "application/json"
    objXmlHttp.SetRequestHeader "User-Agent", "ASP/3.0"
    objXmlHttp.SetRequestHeader "Authorization", "xxxxxx"
    objXmlHttp.Send (data)

那么我的代码是错误的还是在接收端到我发送代码的地方有问题?

感谢任何输入,谢谢。

0 个答案:

没有答案