lavkach3
1htmx.defineExtension('json-enc', {2onEvent: function (name, evt) {3if (name === "htmx:configRequest") {4evt.detail.headers['Content-Type'] = "application/json";5}6},7
8encodeParameters : function(xhr, parameters, elt) {9xhr.overrideMimeType('text/json');10return (JSON.stringify(parameters));11}12});