我想在Rest API中传递到JSON以下
$("table.order-list").on("click", ".ibtnDel", function(_event) {
$(this).closest("tr").remove();
counter -= 1
evaluateTotal()
});
$('body').on('change', '[data-action="sumDebit"]', function() {
evaluateTotal();
});
function evaluateTotal() {
var total = 0;
$('[data-action="sumDebit"]').each(function(_i, e) {
var val = parseFloat(e.value);
if (!isNaN(val))
total += val;
});
$('#totaldbt').val(total);
}
我会尝试以下方法,但效果不佳
{"fulfillment":{"order_id":67584463,"tracking_number":"555555","tracking_url":"test.com","fulfillment_line_items":[{"order_line_item_id":186994328,"quantity":1}]}}
答案 0 :(得分:0)
只需使用AddBody
方法即可传递正文。
var client = new RestClient("XXXXX");
var request = new RestRequest(Method.POST);
requst.AddBody = (jsonString); //Your json string goes here