我試圖張貼JSON一個API及其給我下面的錯誤...角,JSON發送到API
http://www.website.com/getPriceNoAuth?json=[object%20Object] 405(不允許的方法)
這是JSON對象我想發送和它的http resuest ...
var productAttributes = {
"CostRequirements":[
{
"OriginPostcode":"BR60ND",
"BearerSize":100,
"BandwidthRequired":10,
"ProductCode":"CON-ELA",
"Term":36,
"Quantity":1
},
{
"ProductCode":"CON-ADD-IP4",
"Term":36,
"Quantity":0
},
{
"ProductCode":"CON-ADD-INT",
"Term":36,
"Quantity":0
}
]
}
this.getPrices1 = function() {
return $http.post('http://www.website.com/getPriceNoAuth?json=' + productAttributes).
success(function(resp){
//log something here.
});
};
有沒有人看到我做錯了什麼?謝謝。
@LeeWillis我不知道用戶的需求,也許他需要它是你的透視嗎? :) – sbaaaang 2015-02-06 14:25:17
它只是一個內部應用程序的少量數據。你是爲我工作的。謝謝 – 2015-02-06 14:38:12
@Josethehose不客氣! – sbaaaang 2015-02-06 14:39:36