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