Closed
Description
In my project we use ajax to handle request in stimulus and we are trying to update to request.js:
Example:
$.ajax({
beforeSend: function (xhr) {
xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
},
url: url,
remote: true,
dataType: 'script',
type: 'get',
});
For this we need this dataType script to execute js files, but in the request.js docs there are only 3 options for responseKind (html, turbo-stream, json). A new script option would be interesting
Metadata
Metadata
Assignees
Labels
No labels