1
createHook: function(scope,callback_url) {
http.open("POST","https://api.bigcommerce.com/"+this.context+"/v2/hooks",false);
http.setRequestHeader("Content-Type","application/json");
http.setRequestHeader("Accept","application/json");
http.setRequestHeader("X-Auth-Client",this.client_id);
http.setRequestHeader("X-Auth-Token",this.access_token);
http.send(JSON.stringify({
scope: scope,
destination: callback_url,
is_active: true
}));
}
此尝试返回状态码400,其中的错误设置为“无效标头”。创建挂钩失败:无效标头
任何其他API函数(包括列表挂钩(GET/hooks))都是成功的。
您已将此标签标记为classic asp。它这js应该运行客户端或服务器端? – John 2014-12-05 17:09:27