【发布时间】:2017-09-27 21:36:47
【问题描述】:
使用https://github.com/dabeng/OrgChart 如何在 ajax 调用中设置请求标头
我正在尝试以下方法
$('#chart-container').orgchart({
'data' : '/api/v1/profiles/orgchart/',
'beforeSend': function(xhr){xhr.setRequestHeader('X-CSRF-TOKEN', token);},
'nodeContent': 'account_firstname'
});
但这不起作用
【问题讨论】:
标签: jquery ajax request http-headers orgchart