vakata / jstree

jquery tree plugin
http://jstree.com
MIT License
5.15k stars 1.38k forks source link

Can't send authorization headers in ajax request #2477

Closed chetan776 closed 3 years ago

chetan776 commented 3 years ago

I want to send headers in my ajax request but in the library, there is no option to send headers.

vakata commented 3 years ago

core.data accepts a jQuery AJAX settings object - so you should be able to send and do whatever you need (https://api.jquery.com/jquery.ajax/ - search for "headers" and you will find the beforeSend option which is how jQuery does it). You can also set core.data to callback function and inside it you can use whatever you please to fire off AJAX events so you have FULL control over headers, data, etc.